Skip to content

Instantly share code, notes, and snippets.

@mattdesl
Created March 15, 2013 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattdesl/5172873 to your computer and use it in GitHub Desktop.
Save mattdesl/5172873 to your computer and use it in GitHub Desktop.
#ifdef GL_ES
#define LOWP lowp
precision mediump float;
#else
#define LOWP
#endif
varying vec2 vTexCoord0;
varying vec2 vTexCoord1;
varying LOWP vec4 vColor;
uniform sampler2D u_texture0;
uniform sampler2D u_texture1;
void main(void) {
vec4 texColor0 = texture2D(u_texture0, vTexCoord0);
vec4 texColor1 = texture2D(u_texture1, vTexCoord1);
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord0;
attribute vec2 a_texCoord1;
uniform mat4 u_projTrans;
varying vec2 vTexCoord0;
varying vec2 vTexCoord1;
varying vec4 vColor;
void main() {
vColor = a_color;
vTexCoord0 = a_texCoord0;
vTexCoord1 = a_texCoord1;
gl_Position = u_projTrans * a_position;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment