Skip to content

MC_HAND_DEPTH

MC_HAND_DEPTH

The clip space depth multiplier applied to geometry in gbuffers_hand and gbuffers_hand_water.

The multiplier is applied in clip space automatically through the [projection matrix](/reference/uniforms/matrices/projectionMatrix]. When working backwards from the depth buffer, the multiplier should be applied in NDC space rather than screen space to produce the correct result, for example:

float screenDepth = texture(depthtex0, texcoord).r;
float ndcDepth = (screenDepth * 2.0 - 1.0) / MC_HAND_DEPTH;