Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_output_aov.c
| Show All 37 Lines | |||||
| static int node_shader_gpu_output_aov(GPUMaterial *mat, | static int node_shader_gpu_output_aov(GPUMaterial *mat, | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| GPUNodeStack *in, | GPUNodeStack *in, | ||||
| GPUNodeStack *out) | GPUNodeStack *out) | ||||
| { | { | ||||
| 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); | ||||
| return true; | return true; | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_output_aov(void) | void register_node_type_sh_output_aov(void) | ||||
| Show All 15 Lines | |||||