Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Depth_test Enabling renders nothing with LEQUAL or LESS (GL3+)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 mrmurder   Members   -  Reputation: 136

Like
0Likes
Like

Posted 01 October 2012 - 09:53 AM

Hello all,

I'm having an awkward problem and haven't been able to solve this yet.

I am rendering a basic random point cloud using VAO's, VBO+IBO, glsl 1.5, etc.

The problem is that i can render everything just fine when disabling DEPTH_TEST or setting DepthFunc to GEQUAL or GREATER. this is not what i wanted. i need the depth buffer to be using LESS or LEQUAL.

anyone have any idea why this could be happening?

When using GREATER the point cloud shows up on screen (not sorted correctly but thats because of the depth func, it's inverted).
When using LESS or LEQUAL nothing shows up on screen..

here's my render states:

glFrontFace( GL_CCW );
	glCullFace( GL_BACK );
	glEnable( GL_CULL_FACE );
  
	glDisable( GL_BLEND );

	glDepthFunc( GL_LEQUAL );
	glDepthMask( true );
	glEnable( GL_DEPTH_TEST );

Edited by mrmurder, 01 October 2012 - 10:07 AM.


Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 8633

Like
1Likes
Like

Posted 01 October 2012 - 10:07 AM

My two guesses is that you either have the near and far clip planes reversed (likely not the issue if you're using a perspective projection), or you're clearing the depth buffer with 0 instead of 1.

#3 mrmurder   Members   -  Reputation: 136

Like
0Likes
Like

Posted 01 October 2012 - 10:23 AM

Thanks for the help! It was indeed the depth buffer clear set to 0.. Thank you so much, you just released me from a day of pain looking for this problem!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS