diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-05-10 00:51:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-05-10 00:52:31 +0300 |
commit | 35594f4b92fa4cbb5b848f447b7a3323e572b676 (patch) | |
tree | 2f5bcfdc0d4bd8ba87bfa6ffa6b89be17ff2fbc7 /source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl | |
parent | 10865c8f349892cda4715cfe0b2e984c9a844deb (diff) |
Fix T97985 EEVEE: Shader mixing not working correctly when reusing shader nodes
This was caused by the `Closure` members being added to the final contribution
more than once. The workaround is to clear the members once a closure has
been added to the final contribution. I used `inout` on `Closure` inputs
so that the render engine implementation of mix and add closure nodes
can do its own thing. The nodegraph handling of inout was changed for this
to work.
Diffstat (limited to 'source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl index 99117400c57..3f42b6d9094 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl @@ -1,4 +1,4 @@ -void node_add_shader(Closure shader1, Closure shader2, out Closure shader) +void node_add_shader(inout Closure shader1, inout Closure shader2, out Closure shader) { shader = closure_add(shader1, shader2); } |