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/VertexEffectWave.java
181 181
      +     "n.x = (n.x*normal.z + n.z*normal.x);                     \n"   //
182 182
      +     "n.y = (n.y*normal.z + n.z*normal.y);                     \n"   // ? Because if we do the above, my Nexus4 crashes
183 183
      +     "n.z = (n.z*normal.z);                                    \n"   // during shader compilation!
184
      +     "n = normalize(n);                                        \n"
184 185
      +     "}                                                        \n"
185 186
      +   "}";
186 187
    }

Also available in: Unified diff