diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-10 00:48:06 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-10 00:48:06 +0100 |
commit | c9bf24c7d1c10e2ff7349fa2d9010895860977a9 (patch) | |
tree | 1409d6504ba7abd341beec9df01ef58aae792a43 /gfx | |
parent | Use LightDirection for calculating/passing all light dir components (diff) | |
download | ilt-c9bf24c7d1c10e2ff7349fa2d9010895860977a9.tar.bz2 ilt-c9bf24c7d1c10e2ff7349fa2d9010895860977a9.tar.xz ilt-c9bf24c7d1c10e2ff7349fa2d9010895860977a9.zip |
Fix stencil shadow depth offset
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/gl/shaders/shadowDynamicPointStencil.fs | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |