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:
Submodule release/scripts/addons updated: 27fe7f3a4f...cdabac54c4
@@ -79,7 +79,7 @@ bool EEVEE_renderpasses_only_first_sample_pass_active(EEVEE_Data *vedata)
|
|||||||
* type the rest of the bits are used for the name hash. */
|
* type the rest of the bits are used for the name hash. */
|
||||||
int EEVEE_renderpasses_aov_hash(const ViewLayerAOV *aov)
|
int EEVEE_renderpasses_aov_hash(const ViewLayerAOV *aov)
|
||||||
{
|
{
|
||||||
int hash = BLI_hash_string(aov->name);
|
int hash = BLI_hash_string(aov->name) << 1;
|
||||||
SET_FLAG_FROM_TEST(hash, aov->type == AOV_TYPE_COLOR, EEVEE_AOV_HASH_COLOR_TYPE_MASK);
|
SET_FLAG_FROM_TEST(hash, aov->type == AOV_TYPE_COLOR, EEVEE_AOV_HASH_COLOR_TYPE_MASK);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
@@ -43,8 +43,9 @@ static int node_shader_gpu_output_aov(GPUMaterial *mat,
|
|||||||
{
|
{
|
||||||
GPUNodeLink *outlink;
|
GPUNodeLink *outlink;
|
||||||
NodeShaderOutputAOV *aov = (NodeShaderOutputAOV *)node->storage;
|
NodeShaderOutputAOV *aov = (NodeShaderOutputAOV *)node->storage;
|
||||||
/* Keep in sync with `renderpass_lib.glsl#render_pass_aov_hash`. */
|
/* Keep in sync with `renderpass_lib.glsl#render_pass_aov_hash` and
|
||||||
unsigned int hash = BLI_hash_string(aov->name) & ~1;
|
* `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_stack_link(mat, node, "node_output_aov", in, out, &outlink);
|
||||||
GPU_material_add_output_link_aov(mat, outlink, hash);
|
GPU_material_add_output_link_aov(mat, outlink, hash);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user