Revision 7bebb196
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/effect/MatrixEffectShear.java | ||
---|---|---|
59 | 59 |
float y = uniforms[NUM_UNIFORMS*index+5]; |
60 | 60 |
float z = uniforms[NUM_UNIFORMS*index+6]; |
61 | 61 |
|
62 |
Matrix.translateM(matrix, 0, x,-y, z);
|
|
62 |
Matrix.translateM(matrix, 0, x, y, z);
|
|
63 | 63 |
|
64 | 64 |
matrix[4] += sx*matrix[0]; // Multiply viewMatrix by 1 x 0 0 , i.e. X-shear. |
65 | 65 |
matrix[5] += sx*matrix[1]; // 0 1 0 0 |
... | ... | |
76 | 76 |
matrix[6] += sz*matrix[10];// 0 z 1 0 |
77 | 77 |
matrix[7] += sz*matrix[11];// 0 0 0 1 |
78 | 78 |
|
79 |
Matrix.translateM(matrix, 0,-x, y, -z);
|
|
79 |
Matrix.translateM(matrix, 0,-x,-y,-z);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).