Pass depth scale factors to vertex shaders.

This commit is contained in:
Paul Chote
2015-10-01 18:55:54 +01:00
parent c00ef40151
commit dabea59b7d
7 changed files with 61 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
uniform vec2 Scroll;
uniform vec2 r1, r2;
uniform vec3 Scroll;
uniform vec3 r1, r2;
attribute vec4 aVertexPosition;
attribute vec4 aVertexTexCoord;
@@ -7,7 +7,6 @@ varying vec4 vTexCoord;
void main()
{
vec2 p = (aVertexPosition.xy - Scroll.xy)*r1 + r2;
gl_Position = vec4(p.x,p.y,0,1);
gl_Position = vec4((aVertexPosition.xyz - Scroll.xyz) * r1 + r2, 1);
vTexCoord = aVertexTexCoord;
}