Skip to content

Commit

Permalink
Update shader.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wizgrav authored Aug 27, 2017
1 parent e28d623 commit 00fb517
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Shader.prototype.render = function (data, clear) {
iGlobalTime: (data.time - this.startTime) % (Math.PI*60),
iMouse: this.mouse,
}

uniforms.iTime = uniforms.iGlobalTime;
gl.useProgram(this.programInfo.program);
twgl.setBuffersAndAttributes(gl, this.programInfo, this.bufferInfo);
twgl.setUniforms(this.programInfo, uniforms);
Expand All @@ -64,6 +64,7 @@ Shader.prototype.fragmentHeader = [
"uniform float iTransition;",
"uniform vec4 iCorrect;",
"uniform float iGlobalTime;",
"uniform float iTime;",
"uniform vec3 iResolution;",
"uniform vec4 iMusic[4];",
"uniform vec3 iMouse;",
Expand Down Expand Up @@ -114,4 +115,4 @@ Shader.prototype.fragmentCorrect = [
" color.a = iTransition < 1.0 ? iTransition * clamp(0.2,1.0,l): 1.0;",
" gl_FragColor = color;",
"}"
].join("\n");
].join("\n");

0 comments on commit 00fb517

Please sign in to comment.