diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-06-21 11:38:26 -0400 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-06-21 11:38:32 -0400 |
commit | e766175bbd39a05bd9561e2a90fd233a3cca86c5 (patch) | |
tree | 196a655aae05f9084911a71088d8f9316c2d60e5 /src/library_gl.js | |
parent | 45f1d2d84a29cc59e9d0e4a47f1540686d33c709 (diff) |
Fix a number of typos
Diffstat (limited to 'src/library_gl.js')
-rw-r--r-- | src/library_gl.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index d377d6d6..b423643e 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1547,7 +1547,7 @@ var LibraryGL = { (colorSize ? 'attribute vec4 a_color; \n': 'uniform vec4 u_color; \n') + (GLEmulation.fogEnabled ? ( 'varying float v_fogFragCoord; \n' + - 'uniform vec4 u_fogColor; \n' + 'uniform vec4 u_fogColor; \n' + 'float ffog(in float ecDistance) { \n' + // GL_EXP implementation. TODO: implement other fog modes // fog = exp2(-gl_Fog.density * gl_FogFragCoord * LOG2E) @@ -1562,7 +1562,7 @@ var LibraryGL = { 'uniform mat4 u_projection; \n' + 'void main() \n' + '{ \n' + - ' vec4 ecPosition = (u_modelView * vec4(a_position, ' + zero + '1.0); \n' + // eye-coordinate position + ' vec4 ecPosition = (u_modelView * vec4(a_position, ' + zero + '1.0)); \n' + // eye-coordinate position ' gl_Position = u_projection * ecPosition; \n' + (hasTextures ? 'v_texCoord = a_texCoord0; \n' : '') + (colorSize ? 'v_color = a_color; \n' : 'v_color = u_color; \n') + @@ -1581,9 +1581,9 @@ var LibraryGL = { ) : '') + 'void main() \n' + '{ \n' + - (GLEmulation.fogEnabled ? 'v_color = vec4(mix(vec3(u_fogColor), vec3(v_color), fog), 1.0); \n' : '') + - (hasTextures ? 'gl_FragColor = v_color * texture2D( u_texture, v_texCoord );\n' : - 'gl_FragColor = v_color;\n') + + (GLEmulation.fogEnabled ? 'vec4 color = vec4(mix(vec3(u_fogColor), vec3(v_color), v_fogFragCoord), 1.0); \n' : '') + + (hasTextures ? 'gl_FragColor = color * texture2D( u_texture, v_texCoord );\n' : + 'gl_FragColor = color;\n') + '} \n'); Module.ctx.compileShader(this.fragmentShader); |