Skip to content

Instantly share code, notes, and snippets.

@tedigc
Last active September 10, 2017 19:48
Show Gist options
  • Select an option

  • Save tedigc/9b643b3d3910dc7b3b563d2e7ca10270 to your computer and use it in GitHub Desktop.

Select an option

Save tedigc/9b643b3d3910dc7b3b563d2e7ca10270 to your computer and use it in GitHub Desktop.
default shader programs for libGDX
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
uniform mat4 u_projTrans;
void main() {
gl_FragColor = v_color * texture2D(u_texture, v_texCoords);
}
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord;
uniform mat4 u_projTrans;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
v_color = a_color;
v_texCoord = a_texCoord + 0;
gl_Position = u_projTrans * a_position;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment