Skip to content

Commit

Permalink
Removed adjT hack since we don't really need it for this use case.
Browse files Browse the repository at this point in the history
  • Loading branch information
njx committed Sep 27, 2012
1 parent 2f2158e commit 5cbd397
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions shader.vs
Expand Up @@ -47,12 +47,11 @@ void main()
{ {
vec4 pos = a_position; vec4 pos = a_position;
float ramp = step(0.5, 1.0 - a_meshCoord.y) * a_meshCoord.y + step(0.5, a_meshCoord.y) * (1.0 - a_meshCoord.y); float ramp = step(0.5, 1.0 - a_meshCoord.y) * a_meshCoord.y + step(0.5, a_meshCoord.y) * (1.0 - a_meshCoord.y);
float adjT = t * 0.999; // don't get to the end to avoid overlap


pos.z = ramp * -50.0 * mapDepth * adjT; pos.z = ramp * -50.0 * mapDepth * t;
pos.y = (pos.y + 0.5) * (1.0 - adjT) - 0.5; pos.y = (pos.y + 0.5) * (1.0 - t) - 0.5;


v_lighting = 1.0 - (ramp * adjT * 0.5); v_lighting = 1.0 - (ramp * t * 0.5);


gl_Position = u_projectionMatrix * transform * pos; gl_Position = u_projectionMatrix * transform * pos;
} }

0 comments on commit 5cbd397

Please sign in to comment.