Skip to content

Instantly share code, notes, and snippets.

@jonvuri
Created April 13, 2016 02:36
Show Gist options
  • Save jonvuri/e0fcd2c21d1fa624a5f1a70aa76001eb to your computer and use it in GitHub Desktop.
Save jonvuri/e0fcd2c21d1fa624a5f1a70aa76001eb to your computer and use it in GitHub Desktop.
@@ -3861,6 +3845,10 @@ Spasm.ShaderProgram.prototype.link = function() {
, c = this.fragmentShader;
b.attachShader(a, d.shader);
b.attachShader(a, c.shader);
+
+ // Force a_position (used in all shaders) to attribute 0 for performance
+ b.bindAttribLocation(a, 0, 'a_position')
+
b.linkProgram(a)
}
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment