Project

General

Profile

« Previous | Next » 

Revision 7bebb196

Added by Leszek Koltunski over 5 years ago

Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).

View differences:

src/main/java/org/distorted/library/effect/VertexEffectWave.java
54 54
    uniforms[index+3] = (float)(Math.PI*uniforms[index+3]/180);
55 55
    uniforms[index+4] = (float)(Math.PI*uniforms[index+4]/180);
56 56

  
57
    uniforms[index+REGION_OFFSET+1] =-uniforms[index+REGION_OFFSET+1];  // region's y
58

  
59 57
    return ret;
60 58
    }
61 59

  
......
136 134
      + "float amplitude = vUniforms[effect  ].x; \n"
137 135
      + "float length    = vUniforms[effect  ].y; \n"
138 136

  
139
      + "vec3 ps = center - v.xyz; \n"
137
      + "vec3 ps = center - v; \n"
140 138
      + "float deg = amplitude*degree_region(vUniforms[effect+2],ps); \n"
141 139

  
142 140
      + "if( deg != 0.0 && length != 0.0 ) \n"

Also available in: Unified diff