aboutsummaryrefslogtreecommitdiff
path: root/src/library_gl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-07 10:39:52 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-07 10:39:52 -0700
commit0a0c590700e31156c52a5e10d28a0fd71b367124 (patch)
tree920325b766aa675163b6fa9f475f21ac8dae0c7c /src/library_gl.js
parenta4507e931b65c154e338fe420086264676aaf717 (diff)
combine texture and color in immediate mode
Diffstat (limited to 'src/library_gl.js')
-rw-r--r--src/library_gl.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index c5118ee7..d9c3492d 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -1362,8 +1362,8 @@ var LibraryGL = {
'varying vec4 v_color; \n' +
'void main() \n' +
'{ \n' +
- (textureSize ? 'gl_FragColor = texture2D( u_texture, v_texCoord );\n' :
- 'gl_FragColor = v_color;\n') + // XXX multply!
+ (textureSize ? 'gl_FragColor = v_color * texture2D( u_texture, v_texCoord );\n' :
+ 'gl_FragColor = v_color;\n') +
'} \n');
Module.ctx.compileShader(this.fragmentShader);