Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-02-22 18:59:18 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-02-22 19:34:09 +0300
commitcd1a08398437bb6be4ea82bb553ef3e8dcaee7ab (patch)
treebbaaac001df4b93c46c110afb622a7e860d6eefc /source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl
parent1ec626f4bd06e830edc13a8a6986eec2885499dd (diff)
Fix T85720 EEVEE: Contact shadows do not appear when enabling SSR
Contact shadows needed correct `gl_FragCoord.z` but this is not correctly set for fullscreen passes. Need to pass depth using a global variable until we get rid of `cl_eval.tracing_depth`.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl
index 1b7c535379e..a4b29d68ac4 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_ssr_frag.glsl
@@ -569,6 +569,8 @@ void main()
discard;
}
+ FragDepth = depth;
+
viewPosition = get_view_space_from_depth(uvcoordsvar.xy, depth);
worldPosition = transform_point(ViewMatrixInverse, viewPosition);