Created
April 16, 2018 05:52
-
-
Save warmwaffles/58553852df1cb2561f5e6722dd2769b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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