diff options
author | Thomas Dinges <blender@dingto.org> | 2013-06-13 12:55:51 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-06-13 12:55:51 +0400 |
commit | d523d27e621f92c2fd9cb53f9dbbb62750bacc2c (patch) | |
tree | 9233a7d9810a1877958433d4771e50c8e2692d13 /intern/cycles/render/nodes.cpp | |
parent | 182914873a13485a7b8d7b85884c655fccdefa48 (diff) |
Cycles / Blackbody node:
* First step towards a Blackbody to RGB converter. You can specify a color in Kelvin inside the node.
* Only implemented for OSL atm, SVM will follow.
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 74033d5c2fa..d7a98bfba90 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -2977,6 +2977,32 @@ void WavelengthNode::compile(OSLCompiler& compiler) compiler.add(this, "node_wavelength"); } +/* Blackbody */ + +BlackbodyNode::BlackbodyNode() +: ShaderNode("Blackbody") +{ + add_input("Temperature", SHADER_SOCKET_FLOAT, 1200.0f); + add_output("Color", SHADER_SOCKET_COLOR); +} + +void BlackbodyNode::compile(SVMCompiler& compiler) +{ +/* + ShaderInput *temperature in = input("Temperature"); + ShaderOutput *color_out = output("Color"); + + compiler.stack_assign(temperature_in); + compiler.stack_assign(color_out); + compiler.add_node(NODE_BLACKBODY, temperature_in->stack_offset, color_out->stack_offset); +*/ +} + +void BlackbodyNode::compile(OSLCompiler& compiler) +{ + compiler.add(this, "node_blackbody"); +} + /* Output */ OutputNode::OutputNode() |