Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r--intern/cycles/render/nodes.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 3dad4d1a346..0f2581b2a2e 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "render/film.h"
#include "render/image.h"
#include "render/integrator.h"
#include "render/light.h"
@@ -1673,7 +1674,8 @@ RGBToBWNode::RGBToBWNode()
void RGBToBWNode::constant_fold(const ConstantFolder& folder)
{
if(folder.all_inputs_constant()) {
- folder.make_constant(linear_rgb_to_gray(color));
+ float val = folder.scene->shader_manager->linear_rgb_to_gray(color);
+ folder.make_constant(val);
}
}
@@ -1769,7 +1771,8 @@ void ConvertNode::constant_fold(const ConstantFolder& folder)
if(to == SocketType::FLOAT) {
if(from == SocketType::COLOR) {
/* color to float */
- folder.make_constant(linear_rgb_to_gray(value_color));
+ float val = folder.scene->shader_manager->linear_rgb_to_gray(value_color);
+ folder.make_constant(val);
}
else {
/* vector/point/normal to float */