Project

General

Profile

« Previous | Next » 

Revision 30d07491

Added by Leszek Koltunski over 4 years ago

bugfix for VertexEffectRotate

View differences:

src/main/java/org/distorted/library/effect/VertexEffectRotate.java
77 77
             + "float qz = vUniforms[effect].w * sinHalf;      \n"
78 78
             + "float qw = cosHalf;                            \n"
79 79

  
80
             + "v += center;                                   \n"
80
             + "v -= center;                                   \n"
81 81

  
82 82
             + "float tx = qx - v.z*qy + v.y*qz + v.x*qw;      \n"
83 83
             + "float ty = qy + v.z*qx + v.y*qw - v.x*qz;      \n"
......
88 88
             + "v.y = qw*ty - qz*tx - qy*tw + qx*tz;           \n"
89 89
             + "v.z = qw*tz - qz*tw + qy*tx - qx*ty;           \n"
90 90

  
91
             + "v -= center;                                   \n"
91
             + "v += center;                                   \n"
92 92

  
93 93
             + "float nx =  - n.z*qy + n.y*qz + n.x*qw;        \n"
94 94
             + "float ny =  + n.z*qx + n.y*qw - n.x*qz;        \n"

Also available in: Unified diff