diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-07-09 15:32:02 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-07-09 15:34:56 +0300 |
commit | 986ff461fb7ff361f5fb1e5aab49e4f8892258e0 (patch) | |
tree | f75fb4ec0f6067e6c897ba74dc3526199457715e /source/blender/draw/engines/eevee/shaders | |
parent | 7e34846176f3719fb9e03243a06aef40a2c29e5b (diff) |
Fix T65761 Eevee: SSRefraction not working on first sample
There is no reason to disable the refraction on the first sample like SSR
does.
This was caussing issues when rendering.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl | 1 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl index da0778b8a10..c7ae2417904 100644 --- a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl @@ -23,6 +23,7 @@ layout(std140) uniform common_block float ssrFireflyFac; float ssrBrdfBias; bool ssrToggle; + bool ssrefractToggle; /* SubSurface Scattering */ float sssJitterThreshold; bool sssToggle; diff --git a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl index 814cb13de0a..53f1517505c 100644 --- a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl @@ -344,7 +344,7 @@ void CLOSURE_NAME(vec3 N /* Screen Space Refraction */ /* ---------------------------- */ # ifdef USE_REFRACTION - if (ssrToggle && roughness < ssrMaxRoughness + 0.2) { + if (ssrefractToggle && roughness < ssrMaxRoughness + 0.2) { /* Find approximated position of the 2nd refraction event. */ vec3 refr_vpos = (refractionDepth > 0.0) ? transform_point(ViewMatrix, refr_pos) : viewPosition; |