diff options
Diffstat (limited to 'data/shaders/grid.frag')
-rw-r--r-- | data/shaders/grid.frag | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/data/shaders/grid.frag b/data/shaders/grid.frag new file mode 100644 index 0000000..2bfdd7a --- /dev/null +++ b/data/shaders/grid.frag @@ -0,0 +1,19 @@ +#version 330 core + +in VSOUT { + vec2 texcoords; +} vsout; + +out vec4 frag_color; + +uniform sampler2D texture0; + +void main(void) +{ + const float gamma = 2.2; + + vec3 color = vec3(texture(texture0, vsout.texcoords)); + color = pow(color, vec3(1.0/gamma)); + + frag_color = vec4(color, 0.5); +} |