Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL150/PosterizeFP.glsl @ 12302

Last change on this file since 12302 was 12115, checked in by wiesep, 6 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 377 bytes
RevLine 
[12115]1#version 150
2
3uniform sampler2D RT;
4in vec2 oUv0;
5out vec4 fragColour;
6
7void main()
8{
9    float nColors = 8.0;
10    float gamma = 0.6;
11
12    vec4 texCol = vec4(texture(RT, oUv0));
13    vec3 tc = texCol.xyz;
14    tc = pow(tc, vec3(gamma));
15    tc = tc * nColors;
16    tc = floor(tc);
17    tc = tc / nColors;
18    tc = pow(tc, vec3(1.0 / gamma));
19    fragColour = vec4(tc, texCol.w);
20}
Note: See TracBrowser for help on using the repository browser.