diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-06-02 17:58:36 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-06-02 17:58:36 +0300 |
commit | 7654203cc8b6b81013eeef558d6d15a9344fb9d1 (patch) | |
tree | f15d3b3ae990be1b402b20ec89e710853953842e /source/blender/nodes | |
parent | 2489f72d79401fdefa6cf70d5acde806096b7b4a (diff) |
EEVEE: AOVs not same as cycles.
EEVEE uses hashing to sync aov names and types with the gpu.
For the type a hashed value was overridden making `decalA`
and `decalB` choose the same hash. This patches fixes this
by removing the most significant bit.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_output_aov.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_aov.c b/source/blender/nodes/shader/nodes/node_shader_output_aov.c index 403b3e6d9d6..7e7e1b703f1 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output_aov.c +++ b/source/blender/nodes/shader/nodes/node_shader_output_aov.c @@ -43,8 +43,9 @@ static int node_shader_gpu_output_aov(GPUMaterial *mat, { GPUNodeLink *outlink; NodeShaderOutputAOV *aov = (NodeShaderOutputAOV *)node->storage; - /* Keep in sync with `renderpass_lib.glsl#render_pass_aov_hash`. */ - unsigned int hash = BLI_hash_string(aov->name) & ~1; + /* Keep in sync with `renderpass_lib.glsl#render_pass_aov_hash` and + * `EEVEE_renderpasses_aov_hash`. */ + unsigned int hash = BLI_hash_string(aov->name) << 1; GPU_stack_link(mat, node, "node_output_aov", in, out, &outlink); GPU_material_add_output_link_aov(mat, outlink, hash); |