KhronosGroup / OpenGL-Refpages

OpenGL and OpenGL ES reference page sources, and generated HTML used as backing store for khronos.org
435 stars 135 forks source link

GLES 3 glDepthRangef clamping behaviour #46

Closed joonazan closed 6 years ago

joonazan commented 6 years ago

The spec is very unclear on where the clamping happens for depth values. We asked Mark Kilgard, and his interpretation was that clamping should occur immediately, like in GLES 2.

The reference pages state that clamping should only happen when drawing into a fixed-point depth buffer.

NVIDIA implements immediate clamping and ANGLE does not. In desktop GL the issue is more clear. 4.2 did not clamp, but 4.3 does and requires use of extension functions for specifying a range outside [0, 1].

oddhack commented 6 years ago

I'm unclear on what specific action you're requesting here? If it's not specific to the ref pages, the issue should be refiled over on https://github.com/KhronosGroup/OpenGL-API .

joonazan commented 6 years ago

I am requesting a change to the refpages.

In the GLES 3.x pages "If a fixed-point depth representation is used, the parameters n and f are clamped to the range [0 to 1] when computing window z." should instead say that the arguments are clamped immediately.

I'm just doubting this interpretation of the spec as it makes the function a lot less useful.

pdaniell-nv commented 6 years ago

Assigned to @oddhack to make the refpage change. I believe the spec is correct in that the values are clamped when the function is called.