Jump to content
  • Advertisement


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


Blurring textures

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

I''m making a project in 3D, using OpenGL, and I want the objects that are farther away to have blurred textures, kinda like a real persons vision. I''m sure there is a way to do this because I see it in all the flight sims I play. -thanks

Share this post

Link to post
Share on other sites

I''m not sure if this is exactly what you are looking for but my trusty book has a section on using the accumulation buffer for motion blur. Here''s some code it lists to help:

//draw the frame
//Load accum buff with 50% of frame
glAccum(GL_LOAD, 0.5);

//Draw the last 10 frames and accumulate 5% for each
for (int i=0; i<10; i++)
glAccum(GL_ACCUM, 0.05);
//Display the final scene
glAccum(GL_RETURN, 1.0);

Hope it at least interests you if it is not of use to you.

David Stubbs

Share this post

Link to post
Share on other sites
I think that you have in mind the effect of mipmapping. It works pretty easy in practice - if objects is farther away you use a smaller texture (ie 64x64 instead 256x256 and so on), those textures are either pregenerated by you or generated by hardware (it''s easy to notice in older games that as you move away from a wall/object the textures suddenly change quite a bit - a lower resolution mipmap is being used - try quake)
This way instead getting some weird results when trying to render a 256x256 texture onto a 5x5 pixels trinagle you end up with a nice blurred texture. Just refer to some mipmapping tuts, they should explain everything to you.

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!