Cycles: fix mapping node rotation not working correct for Y/Z axes, patch by Sanne.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 12 May 2011 11:34:16 +0000 (11:34 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 12 May 2011 11:34:16 +0000 (11:34 +0000)
intern/cycles/util/util_transform.h

index 9cde410edc8b14bac973ad5ad9c1ccf0eb9c2174..e2b022dc478e377b804dff82c19ad22ea6df9e3d 100644 (file)
@@ -173,8 +173,8 @@ __device_inline Transform transform_euler(float3 euler)
 {
        return
                transform_rotate(euler.x, make_float3(1.0f, 0.0f, 0.0f)) *
-               transform_rotate(euler.y, make_float3(1.0f, 0.0f, 0.0f)) *
-               transform_rotate(euler.z, make_float3(1.0f, 0.0f, 0.0f));
+               transform_rotate(euler.y, make_float3(0.0f, 1.0f, 0.0f)) *
+               transform_rotate(euler.z, make_float3(0.0f, 0.0f, 1.0f));
 }
 
 __device_inline Transform transform_orthographic(float znear, float zfar)