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:
authorThomas Dinges <blender@dingto.org>2014-06-14 01:23:35 +0400
committerThomas Dinges <blender@dingto.org>2014-06-14 01:23:55 +0400
commit6cd595424679c8c29848c797d079cfd7c7b73d6d (patch)
tree90e97ae55f98a8323eedaa0e734137fc7dd5dde3 /source/blender/gpu
parent2c105dd17db33690fcb79100ce947c620d1e2652 (diff)
Implement GLSL code for XYZ nodes.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 5c7872a8b3a..aad675c9494 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -752,6 +752,18 @@ void combine_rgb(float r, float g, float b, out vec4 col)
col = vec4(r, g, b, 1.0);
}
+void separate_xyz(vec3 vec, out float x, out float y, out float z)
+{
+ x = vec.r;
+ y = vec.g;
+ z = vec.b;
+}
+
+void combine_xyz(float x, float y, float z, out vec3 vec)
+{
+ vec = vec3(x, y, z);
+}
+
void separate_hsv(vec4 col, out float h, out float s, out float v)
{
vec4 hsv;