diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-07-03 14:08:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-07-03 14:08:21 +0300 |
commit | 8cc123a387db5989714b133247c0c55aa9cb3f8c (patch) | |
tree | 787c9439f79e1abbdd964260911725590ec903b3 /intern/cycles/kernel/shaders/node_rgb_to_bw.osl | |
parent | 2c9add965b27b4fbb3a2ed99bd248c7b2b41ddcc (diff) |
Fix T48783: OSL render errors after recent refactoring.
Diffstat (limited to 'intern/cycles/kernel/shaders/node_rgb_to_bw.osl')
-rw-r--r-- | intern/cycles/kernel/shaders/node_rgb_to_bw.osl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/intern/cycles/kernel/shaders/node_rgb_to_bw.osl b/intern/cycles/kernel/shaders/node_rgb_to_bw.osl new file mode 100644 index 00000000000..903dfcdc881 --- /dev/null +++ b/intern/cycles/kernel/shaders/node_rgb_to_bw.osl @@ -0,0 +1,25 @@ +/* + * Copyright 2011-2013 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "stdosl.h" + +shader node_rgb_to_bw( + color Color = 0.0, + output float Val = 0.0) +{ + Val = Color[0] * 0.2126 + Color[1] * 0.7152 + Color[2] * 0.0722; +} + |