• Advertisement
Sign in to follow this  

Equivalent to glDepthBoundEXT

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

Advertisement
Quote:
Original post by Evil Steve
That depends on what glDepthBoundEXT does, I can't find any reference to it on Google.


Probably he means glDepthBoundsEXT.
Quote:
http://www.opengl.org/registry/specs/EXT/depth_bounds_test.txt

void DepthBoundsEXT(clampd zmin, clampd zmax);

Each of zmin and zmax are clamped to lie within [0,1] (being of
type clampd). If zmin <= Zpixel <= zmax, then the depth bounds test
passes. Otherwise, the test fails and the fragment is discarded.

Share this post


Link to post
Share on other sites
Yes I meant glDepthBoundsEXT :)
It's quite strange but it doesn't want to work. I've set zmin = 0, zmax = 0.99999 and nothing renders. I doubt if all of my pixels' z values are above 0.99999...

Share this post


Link to post
Share on other sites
Quote:
Original post by Maxest
Yes I meant glDepthBoundsEXT :)
It's quite strange but it doesn't want to work. I've set zmin = 0, zmax = 0.99999 and nothing renders. I doubt if all of my pixels' z values are above 0.99999...
In D3D? The Z value for your pixels can be between the ranges set when you created your projection matrix; typically 0.1f to 1000.0f or similar.

Share this post


Link to post
Share on other sites
Quote:

In D3D? The Z value for your pixels can be between the ranges set when you created your projection matrix; typically 0.1f to 1000.0f or similar.

No, in OpenGL.
And the correct values seem to be between 0 and 1.

Share this post


Link to post
Share on other sites
D3D doesn't have any equivalent, because the extension is nvidia specific. The current D3D API tries to expose things that everyone (or most everyone) implements. D3D10 and D3D11 are more so in this regard than DX9, which still has a plethora of CAPS bits. Its that plethora of CAPS bits and having to code all the different support paths that is a pain, hence the migration away from CAPS bits and a uniform API with very few optional bits.

However, having said all that, I think you could implement this in a pixel shader using discard.

Share this post


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

  • Advertisement