• Advertisement
Sign in to follow this  

blur textures using effects file (dx8)

This topic is 4644 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

how to blur a texture using effects file in dx8. using them for post processing need some example code pls. thanks

Share this post


Link to post
Share on other sites
Advertisement
You can blur the texture by downsampling it. Just use the Usage.AutoGenerateMipmaps flag in he texture creation routine.
In the pixelshader you can use
tex2Dbias(my_sampler, float4(texcoord.xy, 0, amount_to_shrink))

it will return the pixel given the specified amount of downsampling.
Now just use that instead of tex2D and your amount factor can be used to specify how much to blur.

There may be more efficient ways dunno. Perhaps use some sort of filter in the pixelshader but thats probably not better.

Share this post


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

  • Advertisement