diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-03-22 22:41:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-04-18 20:14:34 +0300 |
commit | 029b0df81aa116a3e29f405dc8902834242d5338 (patch) | |
tree | b14a14c4480b9ef826c5a786a479a49f0ca9291f /intern/cycles/scene/shader_nodes.cpp | |
parent | 41b3feea85cd8c323c1c5030f1ab0bc90438df4f (diff) |
Fix Cycles blackbody shader not taking into account OpenColorIO config
Keep the existing Rec.709 fit and convert to other colorspace if needed, it
seems accurate enough in practice, and keeps the same performance for the
default case.
Diffstat (limited to 'intern/cycles/scene/shader_nodes.cpp')
-rw-r--r-- | intern/cycles/scene/shader_nodes.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/scene/shader_nodes.cpp b/intern/cycles/scene/shader_nodes.cpp index a951a558731..95fccf725f3 100644 --- a/intern/cycles/scene/shader_nodes.cpp +++ b/intern/cycles/scene/shader_nodes.cpp @@ -5763,7 +5763,9 @@ BlackbodyNode::BlackbodyNode() : ShaderNode(get_node_type()) void BlackbodyNode::constant_fold(const ConstantFolder &folder) { if (folder.all_inputs_constant()) { - folder.make_constant(svm_math_blackbody_color(temperature)); + const float3 rgb_rec709 = svm_math_blackbody_color_rec709(temperature); + const float3 rgb = folder.scene->shader_manager->rec709_to_scene_linear(rgb_rec709); + folder.make_constant(rgb); } } |