Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2018, 1:06:05 PM (5 years ago)
Author:
wiesep
Message:

Updated programs and adjusted Material to work with GLSL>150

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/Shader_HS18/programs/Example/GLSL150/PosterizeFP.glsl

    r12083 r12091  
    77void main()
    88{
    9         float nColors = 8.0;
    10         float gamma = 0.6;
     9    float nColors = 8.0;
     10    float gamma = 0.6;
    1111
    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);
     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);
    2020}
Note: See TracChangeset for help on using the changeset viewer.