Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

FBO and depthmap

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

Is it correct or even needed to use these function when setting up a depthmap in a FBO?
glTexParameterf(texture_target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
glTexParameterf(texture_target, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);

As of now I have tried both ways and neither makes a difference? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Those two lines is used when shadowing (when you already have the depth-texture) and tells the hardware to do the computations for you.

When you are "setting up" a depthmap, it shouldn't make any difference.
Go to http://oss.sgi.com/projects/ogl-sample/registry/ and read about the extensions if you arn't sure how they work...

Btw.. what are you trying to do? :) Reading a tutorial on shadowmapping might help. ^_^

Good luck!

Share this post


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

  • 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!