Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Blur a cube texture

This topic is 5370 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 can I blur a cube texture? It does not have to work in real time. The problem is that edges and corners, which are shared by different combinations of sides, should be blurred, too. This seems to be impossible to be done by common 2D blurring.

Share this post

Link to post
Share on other sites
I don''t think DirectX has any native support for texture blurring. The only samples in the SDK have to do with motion blur and depth of field blur, which you don''t want.

You could always
1) Lock the texture
2) Access each pixel
3) Get the average color of the surrounding pixels
4) Re-assign pixel value
5) Unlock texture

Dustin Franklin
Mircrosoft DirectX MVP

Share this post

Link to post
Share on other sites
For 2D textures:
You can use StretchRect to blur your textures, if you copy between two different sized textures and/or using a filter. i.e. Say your source texture is 1024x1024, if you copy that to a 512x512 texture with a linear filter, that''ll blur things (it''s called downsampling, by the way).

I don''t know if StretchRect supports cube textures, but the function name implies a "no" to me (you know, a "rect"). Check the docs for more details on this.

Meanwhile, I''ll try to think of something smarter...

Muhammad Haggag

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!