Re: Blurring in HLSL

Jon Watte <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
Zafar Qamar wrote:
> Hi All,
>
> Thanks for all the help you people have given me in the past.
>
> A question about blurring.
> I want to do a soft blur in HLSL. Preferably in one-pass. 
> I've read lots of stuff but I want to know if anyone has managed to come
> up with a solution that works in one-pass and achieves a soft blur, AND
> is fast.
>   


You can't do it in a single pass (as in: the forward pass when you 
render), because the output of blur is non-local, and the geometry pixel 
shader only has access to local information. Thus, it has to be done as 
a post-process, where you can use non-local (image-space) input.

Second, you can calculate the Gaussian blur in a single post-processing 
pass if you want. It's no different from doing the horizontal and 
vertical in two different passes, except for the amount of math 
involved. If you do that, then you'll be using a large amount of pixel 
shader instructions compared to framebuffer writes, which will generally 
be slower than just doing two separate passes on render targets. All 
hardware is decent enough at fill rate compared to shader instructions 
that it doesn't make sense to try to do it in a single post-process 
pass. When we get a 1000:1 ratio of shader ops:framebuffer writes, that 
detemrination may change, but we're nowhere near there just yet :-)

Sincerely,

jw


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.