From baaa89a0bc54a659f9ddbc34cce21d6920c0f6a6 Mon Sep 17 00:00:00 2001 From: OmarSquircleArt Date: Wed, 4 Sep 2019 23:17:13 +0200 Subject: 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 --- source/blender/makesdna/DNA_node_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 0787f41b810..ee5e9a13f66 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1169,6 +1169,14 @@ typedef struct NodeDenoise { #define SHD_AO_INSIDE 1 #define SHD_AO_LOCAL 2 +/* Mapping node vector types */ +enum { + NODE_MAPPING_TYPE_POINT = 0, + NODE_MAPPING_TYPE_TEXTURE = 1, + NODE_MAPPING_TYPE_VECTOR = 2, + NODE_MAPPING_TYPE_NORMAL = 3, +}; + /* math node clamp */ #define SHD_MATH_CLAMP 1 -- cgit v1.2.3