[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Transparency Suggestion
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2007-03-31 15:59:11
Message-ID: 200703311901.15075.rivolaks () hot ! ee
[Download RAW message or body]

Ühel kenal päeval (laupäev 31 märts 2007) kirjutasid sa:
> sorry for the late response,
> as far as i understood, you want to avoid multiple blurring on stacked
> windows - this can indeed save you some cycles (and isn't really notable
> depending on the blur strength and window amount) but a general problem
> here is, that openGL does not provide an unlimited amount of clip planes,
> so you cannot clip away the unneeded areas but just "as much as you can" or

The clipping is done by the stencil buffer. When stencil buffer contains data 
that this pixel is not covered by transparent window (and thus doesn't need 
blurring), then the blurring won't be done at this pixel.

> add vertices, so i guess updating the screenbuffer tex with each blurring
> window and clips (as possible) from a prestacked QList<QRegion> could do
> the job (for the border artefacts, simply oversize the cliprects)

Well, I guess it's one of those things you just need to experiment with, but I 
still believe the stencil approach is better than blurring the entire screen 
multiple times (worst case) :-)

> oh, and (as you'll soon figure out) box/gauss-blurring /is/ horrible
> expensive ;)
> box blurring can be implemented much faster, but i never tried on a
> shader...
> http://www.acm.uiuc.edu/siggraph/workshops/wjarosz_convolution_2001.pdf

AFAIU this cannot be done on GPU because for every pixel, you need to have 
access to the previous already blurred pixel. GPU works in parallel however, 
so you only have access to unblurred pixels.
I have used Kawase blur (also used in Far Cry; 
http://http.download.nvidia.com/developer/presentations/2005/GDC/Direct3D_Day/D3DTutorial08_FarCryAndDX9.pdf) \
 and it works quite well for small filter radii, so I thought about using this 
one.

Rivo
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic