diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-06-20 17:31:22 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-06-20 17:33:04 +0300 |
commit | 6a1cc0d8559401199966edf3423393857fd77250 (patch) | |
tree | 5b42e8e3c3c5167278ca2a61298c1d581798c4f0 /source/blender/gpu | |
parent | 3bb8b64c47eb99388901757dbaaf1b9779b4a648 (diff) |
Fix T99019 EEVEE: Regression: Specular BSDF does not apply occlusion
Since the occlusion input is going to be removed in EEVEE-Next, I just
added a temporary workaround. The occlusion is passed as SSS radius
as the Specular BSDF does not use it.
The final result matches 3.1 release
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl index 7ed8b6f6b84..c95a41c58fc 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl @@ -34,6 +34,13 @@ void node_eevee_specular(vec4 diffuse, diffuse_data.N = N; diffuse_data.sss_id = 0u; + /* WORKAROUND: Nasty workaround to the current interface with the closure evaluation. + * Ideally the occlusion input should be move to the output node or removed all-together. + * This is temporary to avoid a regression in 3.2 and should be removed after EEVEE-Next rewrite. + */ + diffuse_data.sss_radius.r = occlusion; + diffuse_data.sss_radius.g = -1.0; /* Flag */ + ClosureReflection reflection_data; reflection_data.weight = alpha; if (true) { |