• Advertisement
Sign in to follow this  

Blur

This topic is 2934 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im in the middle of implemeneting blur, and am using the following techniques: a)Render scene to back buffer as normal b)Bind rendertarget 1, set backbuffer as shader resource c)Render Quad with horizontal blur (downsized) d)Bind rendertarget 2, set rendertarget 1 as shader resource e)Render Quad with Vertical blur (downsized) f)Bind Backbuffer again, set rendertarget 2 as shader resource g)Render Quad (full size) I make that a 3 step process. In that I have 3 draw calls. Am I right in thinking that the 2 step process that people talk about is the one without the down sizing? ie a)Render scene to back buffer as normal b)Bind rendertarget 1, set backbuffer as shader resource c)Render Quad with horizontal blur d)Bind back buffer, set rendertarget 1 as shader resource e)Render Quad with Vertical blur You'll notice that in the first process I had to use 3 buffers. The back buffer and 2 tempory rendertargets. I originaly had this working with only 2 buffers, the back buffer and another rendertarget. But directx was complaining that I was binding a rendertarget that was currently being used as a shader resource and vice verser. When I was performing the flipping of the buffers from shader resources to rendertargets. Everything was fine though, there is no error, as I wasnt reading and writing to the same buffers, its just that it was giving the warning before I can flip the other. The only way I could get rid of this warning was to before doing anything, set the shader resource to NULL, and apply that shader. And then set the rendertarget that was recently a shader resource. But this seems like extra work that doesnt need to be done. IS there anyway around this?

Share this post


Link to post
Share on other sites
Advertisement
I don't get the whole process.
Why do you have to have separated vertical and horizontal blur?
What is the downsizing thing?

Can't you simply just take many samples from the background (neighboring texels) in the blur shader with proper weights (gaussian for example) and sum them up? (so the sum of all the weights will be one)

Maybe you want something like this with the downsizing thing? I mean the linear filtering combined with the lesser-sampling-blur.

I don't think that a linear filtering of the texture alone will produce nice results (the downsizing stuff, I guess). It will be a "blocky" blur. Unless you can do cubic filtering at downsizing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement