Cycles: support for custom shader AOVs

Custom render passes are added in the Shader AOVs panel in the view layer
settings, with a name and data type. In shader nodes, an AOV Output node
is then used to output either a value or color to the pass.

Arbitrary names can be used for these passes, as long as they don't conflict
with built-in passes that are enabled. The AOV Output node can be used in both
material and world shader nodes.

Implemented by Lukas, with tweaks by Brecht.

Differential Revision: https://developer.blender.org/D4837
This commit is contained in:
Lukas Stockner
2019-12-04 19:57:28 +01:00
committed by Brecht Van Lommel
parent 35b5888b15
commit e760972221
46 changed files with 722 additions and 195 deletions

View File

@@ -405,7 +405,7 @@ ccl_device void kernel_branched_path_integrate(KernelGlobals *kg,
/* Shade background. */
if (!hit) {
kernel_path_background(kg, &state, &ray, throughput, &sd, L);
kernel_path_background(kg, &state, &ray, throughput, &sd, buffer, L);
break;
}
@@ -417,7 +417,7 @@ ccl_device void kernel_branched_path_integrate(KernelGlobals *kg,
if (!(sd.flag & SD_HAS_ONLY_VOLUME)) {
# endif
shader_eval_surface(kg, &sd, &state, state.flag);
shader_eval_surface(kg, &sd, &state, buffer, state.flag);
shader_merge_closures(&sd);
/* Apply shadow catcher, holdout, emission. */