Fix cycles issue with mapping node rotation and scale order. When using both

scale and rotation in mapping node, there would be shearing, and the only way
to avoid that was to add 2 mapping nodes. This is because to transform the
texture, the inverse transform needs to be done on the texture coordinate

Now the mapping node has Texture/Point/Vector/Normal types to transform the
vector for a particular purpose. Point is the existing behavior, Texture is
the new default that behaves more like you might expect.
This commit is contained in:
Brecht Van Lommel
2013-09-25 20:28:49 +00:00
parent e9859bb0e5
commit c3d3d8be36
25 changed files with 173 additions and 40 deletions

View File

@@ -43,6 +43,9 @@ public:
float3 min, max;
bool use_minmax;
enum Type { POINT = 0, TEXTURE = 1, VECTOR = 2, NORMAL = 3 };
Type type;
enum Mapping { NONE = 0, X = 1, Y = 2, Z = 3 };
Mapping x_mapping, y_mapping, z_mapping;