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.
This commit is contained in:
2021-06-02 16:58:36 +02:00
parent 2489f72d79
commit 7654203cc8
2 changed files with 4 additions and 3 deletions

View File

@@ -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);