diff options
author | Lukas Stockner <lukasstockner97> | 2019-12-04 21:57:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-12-10 22:44:46 +0300 |
commit | e760972221e68d3c81f2ee3687cc71836dde8ae9 (patch) | |
tree | b1a2efbb17c05a429e4509d336a1eb14c73cfb8c /intern/cycles/kernel/kernel_types.h | |
parent | 35b5888b157d05d378df3acc899d28856a9eb9a4 (diff) |
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
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 7306c32d7c8..c35e345763a 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -222,6 +222,8 @@ typedef enum ShaderEvalType { SHADER_EVAL_TRANSMISSION_COLOR, SHADER_EVAL_SUBSURFACE_COLOR, SHADER_EVAL_EMISSION, + SHADER_EVAL_AOV_COLOR, + SHADER_EVAL_AOV_VALUE, /* light passes */ SHADER_EVAL_AO, @@ -371,6 +373,8 @@ typedef enum PassType { #endif PASS_RENDER_TIME, PASS_CRYPTOMATTE, + PASS_AOV_COLOR, + PASS_AOV_VALUE, PASS_CATEGORY_MAIN_END = 31, PASS_MIST = 32, @@ -1244,6 +1248,11 @@ typedef struct KernelFilm { int pass_denoising_clean; int denoising_flags; + int pass_aov_color; + int pass_aov_value; + int pad1; + int pad2; + /* XYZ to rendering color space transform. float4 instead of float3 to * ensure consistent padding/alignment across devices. */ float4 xyz_to_r; |