1#version 150 2 3uniform mat3 colorTransform; 4varying vec3 Color; 5uniform mat4 m, n; 6 7uniform mat4x3 um43; 8uniform mat3x4 un34; 9uniform mat2 um2; 10uniform mat3 um3; 11uniform mat4 um4; 12 13varying vec4 v; 14 15varying vec3 u; 16 17out vec4 FragColor; 18 19void main() 20{ 21 mat3x4 m34 = outerProduct(v, u); 22 23 m34 += mat3x4(4.3); 24 25 FragColor = vec4(Color, 1.0); 26 FragColor *= vec4(FragColor * m34, 1.0); 27 28 m34 *= v.x; 29 30 mat4 m44 = mat4(un34); 31 32 m44 += m34 * um43; 33 34 FragColor += (-m44) * v; 35 36 FragColor *= matrixCompMult(m44, m44); 37 38 m34 = transpose(um43); 39 FragColor *= vec4(FragColor * m34, 1.0); 40 FragColor *= vec4(determinant(um4)); 41 mat2 inv = inverse(um2); 42 FragColor *= vec4(inv[0][0], inv[1][0], inv[0][1], inv[1][1]); 43 mat3 inv3 = inverse(um3); 44 FragColor *= vec4(inv3[2][1]); 45 46 mat4 inv4 = inverse(um4); 47 FragColor *= inv4; 48 49 FragColor = vec4(FragColor * matrixCompMult(un34, un34), FragColor.w); 50 m34 *= colorTransform; 51} 52