I want to know what the valid ranges of all the spaces in OpenGL are.
Specifically:
Maximum and Minimum Clip space X, Y, and Z (gl_Position
)
Maximum and Minimum gl_FragCoord
X, Y, and Z
Maximum and Minimum gl_FragDepth
value
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Sign up to join this communityI want to know what the valid ranges of all the spaces in OpenGL are.
Specifically:
Maximum and Minimum Clip space X, Y, and Z (gl_Position
)
Maximum and Minimum gl_FragCoord
X, Y, and Z
Maximum and Minimum gl_FragDepth
value
There's no real limit to any of these. Of course floats have maximum values (I think around 10^308), but if you have problems with that, then reconsider what you're doing.
If the depth falls out of the specified range by glDepthRange
(or [0,1] by default), then it will get clipped due to depth buffer issues, but it can have any value.