Created
February 4, 2013 06:35
-
-
Save Shaptic/4705303 to your computer and use it in GitHub Desktop.
Fragment shader for mono-chrome texture rendering.
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 | |
// 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