Skip to content

Instantly share code, notes, and snippets.

@warmwaffles
Created April 16, 2018 05:52
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 warmwaffles/58553852df1cb2561f5e6722dd2769b0 to your computer and use it in GitHub Desktop.
Save warmwaffles/58553852df1cb2561f5e6722dd2769b0 to your computer and use it in GitHub Desktop.
#version 330 core
in vec2 v_texcoord;
in vec4 v_color;
uniform sampler2D u_tex;
uniform mat4 u_combined;
out vec4 f_color;
void main()
{
f_color = texture(u_tex, v_texcoord) * v_color;
}
#version 330 core
layout (location = 0) in vec3 a_position;
layout (location = 1) in vec4 a_color;
layout (location = 2) in vec2 a_texcoord;
out vec2 v_texcoord;
out vec4 v_color;
uniform mat4 u_combined;
void main()
{
v_color = a_color;
v_texcoord = a_texcoord;
gl_Position = u_combined * vec4(a_position, 1.0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment