Is it possible to do reverse-Z with OpenGL when ARB_clip_control is available?
#4000
Unanswered
Lolothepro
asked this question in
Q&A
Replies: 1 comment
|
Your reading matches the current GL backend: ARB_clip_control is detected, but that alone does not switch bgfx's GL depth convention. homogeneousDepth is therefore still part of bgfx's backend contract, and projection helpers are expected to use bgfx::getCaps()->homogeneousDepth. Calling glClipControl externally would also put bgfx's shader/projection assumptions out of sync. So true GL reverse-Z via zero-to-one clip depth would need renderer support in bgfx itself, not just enabling the extension in application code. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have a dumb question: is it possible to do something similar to Vulkan on OpenGL when
ARB_clip_controlis available?The GL renderer reports
homogeneousDepth=true.ARB_clip_controlis detected andglClipControlis imported inglimports.h, but it's not used. If I understand correctly,BGFX_CONFIG_GL_NORMALIZE_NDC_CONVENTIONSonly hides this by rewritinggl_Position.z = z*2 - win the vertex shader, so depth still goes through [-1,1].All reactions