Jump to content
  • Advertisement
Sign in to follow this  
thedigga007

OpenGL Direct3D texture sampling comparison modes

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

Hi I am trying to implement a self shadowing technique in D3D that I already have working in OpenGL and I am confused about one thing. In OpenGL I can set the comparison mode of a texture (using GL_TEXTURE_COMPARE_MODE) meaning I can sample the texture and use that value as a reference in a comparison (getting a value of 0 or 1) rather then sampling like a normal texture. I am fairly new to D3D and couldn't figure out how to do this via the documentation. Any help is appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Which version of the API are you using? D3D9 doesn't support this natively...you can do it for shadow maps with proprietary "extensions" for Nvidia or ATI. In D3D10/D3D11 there's the ComparisonFunc member of D3D10_SAMPLER_DESC/D3D11_SAMPLER_DESC.

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!