From c9bf24c7d1c10e2ff7349fa2d9010895860977a9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 10 Oct 2024 00:48:06 +0100 Subject: Fix stencil shadow depth offset --- gfx/gl/shaders/shadowDynamicPointStencil.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl/shaders/shadowDynamicPointStencil.fs') diff --git a/gfx/gl/shaders/shadowDynamicPointStencil.fs b/gfx/gl/shaders/shadowDynamicPointStencil.fs index e612691..fe91b07 100644 --- a/gfx/gl/shaders/shadowDynamicPointStencil.fs +++ b/gfx/gl/shaders/shadowDynamicPointStencil.fs @@ -12,5 +12,5 @@ main() if (stDepth >= 1) { discard; } - gl_FragDepth = gl_FragCoord.z + (stDepth * scale.z); + gl_FragDepth = gl_FragCoord.z + ((stDepth - 0.5) * scale.z); } -- cgit v1.2.3