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/render/graph.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/render/graph.h')
-rw-r--r-- | intern/cycles/render/graph.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h index cade04de374..0ea7935f714 100644 --- a/intern/cycles/render/graph.h +++ b/intern/cycles/render/graph.h @@ -67,6 +67,7 @@ enum ShaderNodeSpecialType { SHADER_SPECIAL_TYPE_COMBINE_CLOSURE, SHADER_SPECIAL_TYPE_OUTPUT, SHADER_SPECIAL_TYPE_BUMP, + SHADER_SPECIAL_TYPE_OUTPUT_AOV, }; /* Input @@ -104,6 +105,8 @@ class ShaderInput { ((Node *)parent)->set(socket_type, f); } + void disconnect(); + const SocketType &socket_type; ShaderNode *parent; ShaderOutput *link; @@ -130,6 +133,8 @@ class ShaderOutput { return socket_type.type; } + void disconnect(); + const SocketType &socket_type; ShaderNode *parent; vector<ShaderInput *> links; |