diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-05 00:17:13 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-05 00:17:13 +0300 |
commit | baaa89a0bc54a659f9ddbc34cce21d6920c0f6a6 (patch) | |
tree | f5337407abc1e1e832612cc7643d508ed021eb37 /source/blender/nodes/shader/node_shader_util.c | |
parent | f098f6df767aa62ffe0a7db6635ead058770d92f (diff) |
Shading: Rewrite Mapping node with dynamic inputs.
This patch rewrites the Mapping node to support dynamic inputs. The
Max and Min options have been removed. They can be added as Min and
Max Vector Math nodes manually.
Texture nodes still use the old matrix-based mapping. A new SVM node
`NODE_TEXTURE_MAPPING` has been added to preserve this functionality.
Similarly, in GLSL, a `mapping_mat4` function has been added.
Reviewers: brecht, JacquesLucke
Diffstat (limited to 'source/blender/nodes/shader/node_shader_util.c')
-rw-r--r-- | source/blender/nodes/shader/node_shader_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c index 65676a5ea91..a2b18b61480 100644 --- a/source/blender/nodes/shader/node_shader_util.c +++ b/source/blender/nodes/shader/node_shader_util.c @@ -280,7 +280,7 @@ void node_shader_gpu_tex_mapping(GPUMaterial *mat, tmat2 = GPU_uniform((float *)texmap->mat[2]); tmat3 = GPU_uniform((float *)texmap->mat[3]); - GPU_link(mat, "mapping", in[0].link, tmat0, tmat1, tmat2, tmat3, tmin, tmax, &in[0].link); + GPU_link(mat, "mapping_mat4", in[0].link, tmat0, tmat1, tmat2, tmat3, tmin, tmax, &in[0].link); if (texmap->type == TEXMAP_TYPE_NORMAL) { GPU_link(mat, "vector_normalize", in[0].link, &in[0].link); |