diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-25 10:49:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-25 10:49:08 -0700 |
commit | 7e516c8b034c1a49524eaa140a5da9b9d94e9991 (patch) | |
tree | eeb3a2eb1455959d51ea72f72f273ada537b4491 | |
parent | c7bed7ab29a5e351166bf570825edc2a94c43aef (diff) |
rename s_texture to u_texture
-rw-r--r-- | src/library_gl.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 5824016f..d2b7cd7c 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1280,10 +1280,10 @@ var LibraryGL = { this.fragmentShader = Module.ctx.createShader(Module.ctx.FRAGMENT_SHADER); Module.ctx.shaderSource(this.fragmentShader, 'precision mediump float; \n' + 'varying vec2 v_texCoord; \n' + - 'uniform sampler2D s_texture; \n' + + 'uniform sampler2D u_texture; \n' + 'void main() \n' + '{ \n' + - (textureSize ? 'gl_FragColor = texture2D( s_texture, v_texCoord );\n' : + (textureSize ? 'gl_FragColor = texture2D( u_texture, v_texCoord );\n' : 'gl_FragColor = vec4(0.8, 0.1, 1.0, 1.0);') + '} \n'); Module.ctx.compileShader(this.fragmentShader); @@ -1296,7 +1296,7 @@ var LibraryGL = { this.positionLocation = Module.ctx.getAttribLocation(this.program, 'a_position'); this.texCoordLocation = Module.ctx.getAttribLocation(this.program, 'a_texCoord'); - this.textureLocation = Module.ctx.getUniformLocation(this.program, 's_texture'); + this.textureLocation = Module.ctx.getUniformLocation(this.program, 'u_texture'); this.modelViewLocation = Module.ctx.getUniformLocation(this.program, 'u_modelView'); this.projectionLocation = Module.ctx.getUniformLocation(this.program, 'u_projection'); }, |