diff options
author | Thomas Dinges <blender@dingto.org> | 2014-06-13 23:44:48 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-06-13 23:59:14 +0400 |
commit | 3de3987ea190415d0d088c3917b45f44afb43840 (patch) | |
tree | 35577ec3798ee74ee4c37821ec74981b3c9d7342 /intern/cycles/kernel/shaders/node_separate_xyz.osl | |
parent | 49df707496e505c8a8b21c1ea36b479e950cc66c (diff) |
Cycles: Add dedicated nodes to split/combine vectors.
This was already possible via the RGB nodes, but that seems weird.
Diffstat (limited to 'intern/cycles/kernel/shaders/node_separate_xyz.osl')
-rw-r--r-- | intern/cycles/kernel/shaders/node_separate_xyz.osl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/intern/cycles/kernel/shaders/node_separate_xyz.osl b/intern/cycles/kernel/shaders/node_separate_xyz.osl new file mode 100644 index 00000000000..63725cb9995 --- /dev/null +++ b/intern/cycles/kernel/shaders/node_separate_xyz.osl @@ -0,0 +1,28 @@ +/* + * 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_separate_xyz( + vector Vector = 0.8, + output float X = 0.0, + output float Y = 0.0, + output float Z = 0.0) +{ + X = Vector[0]; + Y = Vector[1]; + Z = Vector[2]; +} |