Skip to content

Instantly share code, notes, and snippets.

@anirul
Last active March 8, 2020 10:50
Show Gist options
  • Save anirul/11d84ba8e8a05568d35550a18870b78c to your computer and use it in GitHub Desktop.
Save anirul/11d84ba8e8a05568d35550a18870b78c to your computer and use it in GitHub Desktop.
Fragment on how to draw a texture to surface.
#version 430 core
layout(location = 0) out vec4 frag_color;
in vec3 out_color;
in vec2 out_texture_coordinate;
uniform sampler2D texture1;
void main()
{
frag_color = mix(
texture(texture1, out_texture_coordinate),
vec4(out_color, 1),
0.3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment