Project

General

Profile

« Previous | Next » 

Revision 457bd08e

Added by Leszek Koltunski over 3 years ago

Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)

View differences:

src/main/java/org/distorted/library/effect/VertexEffectShear.java
72 72
    + "float new_nx = n.x - sy*n.y + sy*sz*n.z;         \n"
73 73
    + "float new_ny =-sx*n.x + tmp*(n.y - sz*n.z);      \n"
74 74
    + "n.x = new_nx;                                    \n"
75
    + "n.y = new_ny;                                    \n";
75
    + "n.y = new_ny;                                    \n"
76

  
77
    + "n = normalize(n);";
76 78
    }
77 79

  
78 80
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff