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/VertexEffectQuaternion.java
78 78

  
79 79
     + "n.x = qw*nx + qz*ny - qy*nz - qx*nw;          \n"
80 80
     + "n.y = qw*ny - qz*nx - qy*nw + qx*nz;          \n"
81
     + "n.z = qw*nz - qz*nw + qy*nx - qx*ny;          \n";
81
     + "n.z = qw*nz - qz*nw + qy*nx - qx*ny;          \n"
82

  
83
     + "n = normalize(n);";
82 84
    }
83 85

  
84 86
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff