Jump to content
  • Advertisement
Sign in to follow this  

gl_FrontFacing returns incorrect value

This topic is 2090 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 banging my head against this problem now quite some time. For some reason trying to create a depth cube map (or any cube map for that matter) using in-game rendering the gl_FrontFacing in the shaders returns incorrect values. For front faces it returns false and for back faces true which is totally wrong.


I verified everything I could find on the internet. The following I checked so far:

1) culling back faces front faces are rendered and back faces culled (winding order is thus correct)

2) no mirroring is done in the matrices. it's your ordinary camera transformation matrix


What reasons could cause gl_FrontFacing to return utterly wrong values?


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!