Remove unnecessary uniforms

This commit is contained in:
2021-06-10 18:07:26 +02:00
parent 95f8e57e45
commit 02511afa80
10 changed files with 69 additions and 93 deletions
+5 -5
View File
@@ -6,7 +6,7 @@ out vec3 dField;
out float lum;
uniform vec2 lightPos;
uniform mat4 perpMat;
uniform mat4 worldMat;
uniform vec2 radLum;
float isLHS (vec2 startV, vec2 testV)
@@ -31,10 +31,10 @@ if (isLHS (p1.xy - lightPos, p2.xy - lightPos) < 0)
vec2 d1 = p1.xy - lightPos;
vec2 d2 = p2.xy - lightPos;
vec4 a1 = shiftCloser( perpMat * p1 );
vec4 a2 = shiftCloser( perpMat * p2 );
vec4 a3 = shiftCloser( perpMat * p3 );
vec4 a4 = shiftCloser( perpMat * p4 );
vec4 a1 = shiftCloser( worldMat * p1 );
vec4 a2 = shiftCloser( worldMat * p2 );
vec4 a3 = shiftCloser( worldMat * p3 );
vec4 a4 = shiftCloser( worldMat * p4 );
dField = vec3( d1.x/rad, d1.y/rad, 0);
gl_Position = a1;