Pass:setDepthClamp

Enables or disables depth clamp. Normally, when pixels fall outside of the clipping planes, they are clipped (not rendered). Depth clamp will instead render these pixels, clamping their depth on to the clipping planes.

Pass:setDepthClamp(enable)

Arguments

NameTypeDescription
enableboolean Whether depth clamp should be enabled.

Returns

Nothing

Notes

This isn't supported on all GPUs. Use the depthClamp feature of lovr.graphics.getFeatures to check for support. If depth clamp is enabled when unsupported, it will silently fall back to depth clipping.

Depth clamping is not enabled by default.

See also