summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-08-07 14:44:55 -0700
committerEric Anholt <eric@anholt.net>2009-08-07 14:44:55 -0700
commitfd654e927eaba350542818ba1230d75de4136a98 (patch)
treed2e1523ca593cd9cf7ccdaf5732abe5f82cdbbfa
parent0abadf8012c486ef33fd4d62965ac6a575420119 (diff)
Move texcoord.x *= 4 out of VS into constants.
-rw-r--r--glass.c2
-rw-r--r--glass.vert2
2 files changed, 2 insertions, 2 deletions
diff --git a/glass.c b/glass.c
index 09f0fe4..7d48241 100644
--- a/glass.c
+++ b/glass.c
@@ -549,7 +549,7 @@ revolve(const float *verts, unsigned int num_verts,
tangent[vert_index * 3 + 1] = tangent4[1];
tangent[vert_index * 3 + 2] = tangent4[2];
- tex_coord[vert_index * 2 + 0] = (float)i / steps;
+ tex_coord[vert_index * 2 + 0] = (float)i / steps * 4;
tex_coord[vert_index * 2 + 1] = texcoord_y[j];
}
}
diff --git a/glass.vert b/glass.vert
index f894214..397dac2 100644
--- a/glass.vert
+++ b/glass.vert
@@ -21,7 +21,7 @@ void main()
vec3 vertex_eye = vec3(mv * gl_Vertex);
shadow_coords = light_mvp * gl_Vertex;
- texcoord = vec2(gl_MultiTexCoord0.x * 4, gl_MultiTexCoord0.y);
+ texcoord = gl_MultiTexCoord0.xy;
light_surf = normalize((light_eye - vertex_eye) * tbn);
eye_surf = normalize((-vertex_eye) * tbn);
tangent_surf = gl_MultiTexCoord1.xyz * tbn;