- Timestamp:
- Nov 9, 2018, 1:06:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/Shader_HS18/programs/Example/GLSL150/PosterizeFP.glsl
r12083 r12091 7 7 void main() 8 8 { 9 10 9 float nColors = 8.0; 10 float gamma = 0.6; 11 11 12 13 14 15 16 17 18 tc = pow(tc, vec3(1.0/gamma));19 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 20 }
Note: See TracChangeset
for help on using the changeset viewer.