Skip to content

Instantly share code, notes, and snippets.

@Shaptic
Created February 4, 2013 06:35
Show Gist options
  • Save Shaptic/4705303 to your computer and use it in GitHub Desktop.
Save Shaptic/4705303 to your computer and use it in GitHub Desktop.
Fragment shader for mono-chrome texture rendering.
#version 330 core
// Our texture
uniform sampler2D texture;
// Incoming attributes from the vertex shader
smooth in vec2 fs_texc;
smooth in vec4 fs_color;
// Output color
out vec4 out_color;
void main()
{
out_color = texture2D(texture, fs_texc).rrrr * fs_color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment