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>2016-05-20 22:21:57 +0300
committerThomas Dinges <blender@dingto.org>2016-05-20 22:21:57 +0300
commitecf534e4c588254f6d8f8c9e5b1688f6556dec19 (patch)
tree54ee0e94b6f4df3875e1185e5724872ac29580e7 /source/blender/nodes
parentd5b843ba9d2d560010c921fcdbd9838fd3b6ef5c (diff)
Support Cycles wave texture in GLSL viewport.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
index 100510641e8..1194874e06c 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
@@ -56,12 +56,18 @@ static void node_shader_init_tex_wave(bNodeTree *UNUSED(ntree), bNode *node)
static int node_shader_gpu_tex_wave(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
- if (!in[0].link)
+ if (!in[0].link) {
in[0].link = GPU_attribute(CD_ORCO, "");
+ GPU_link(mat, "generated_from_orco", in[0].link, &in[0].link);
+ }
node_shader_gpu_tex_mapping(mat, node, in, out);
- return GPU_stack_link(mat, "node_tex_wave", in, out);
+ NodeTexWave *tex = (NodeTexWave *)node->storage;
+ float wave_type = tex->wave_type;
+ float wave_profile = tex->wave_profile;
+
+ return GPU_stack_link(mat, "node_tex_wave", in, out, GPU_uniform(&wave_type), GPU_uniform(&wave_profile));
}
/* node type definition */