Jump to content
  • Advertisement
Sign in to follow this  
metalcrusader

StencilValueMask vs. StencilWriteMask

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

Hello! Can anybody explain the difference to me? I ask, because I get different shadows for different masks. I use glStencilFunc( GL,ALWAYS, 0,0) for the stencilbuffer-writings and glStencilFunc( GL_NOTEQUAL, 0, 1) before drawing the "shadow-plane" alternativley glStencilFunc( GL_EQUAL, 0, 1) if I use the two-pass-procedure ( drawing the scene again with all lights on). My problem is that i get different results for zpass and zfail if I use the same stencilMask and also different results if I use different mask only for zPass. Sometimes I get a correct shadow, but the light facing side of the occluder is also in shadow or this front is been lit, but there are holes in the shadow where two shadow intersects. Is there a standart way to use these Masks? Another question: If I try to read out the actual GL_STENCIL_VALUE_MASK or GL_STENCIL_WRITEMASK I get an segfault. Does anybody know how to query these values? I am appreciate for every response!

Share this post


Link to post
Share on other sites
Advertisement
see bottom of page
http://www.opengl.org/resources/features/

"read out the actual GL_STENCIL_VALUE_MASK or GL_STENCIL_WRITEMASK I get an segfault"
this shouldnt happen post your code

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!