Opengl es 2.0 clamp

broken image
broken image

The simple workaround in #11393 is just to disable clamping when both minz and maxz are set. This is probably causing the depth clamp part of #11216, and also causes an issue in #11260, as noted in #11393. Vulkan clamps depth to the depth clipping range. Clipping happens after, so if you clip to a narrower range like, then clamping does nothing useful. Importantly: depth clamp always clamps to the full possible range of Z, regardless of viewport or clipping. Depth clamp: if enabled, depth outside [0, 65535.5) (after viewport) causes portions of triangles outside depth to flatten against the near/far plane.

broken image

Portions of triangles outside this range are not drawn. On the PSP, you've got the following depth parameters: Based on #11260 and #11393, the behavior of Vulkan's depth clamping is a bit wrong.

broken image