Skip to content

Instantly share code, notes, and snippets.

@xl1
Created December 7, 2012 01:08
Show Gist options
  • Save xl1/4229906 to your computer and use it in GitHub Desktop.
Save xl1/4229906 to your computer and use it in GitHub Desktop.
http://jsdo.it/xl1/rD74 のシェーダ
precision mediump float;
uniform vec2 u_textureSize;
void main(){
float x = u_textureSize.x - 50.0;
gl_FragColor = vec4(x / 250.0, 0.0, 0.0, 1.0);
}
attribute vec4 a_position;
uniform mat4 u_projectionMatrix;
void main(){
gl_Position = u_projectionMatrix * a_position;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment