Last change
on this file since 12216 was
12115,
checked in by wiesep, 6 years ago
|
Changed folder structure, deletet some unused files and cleaned up code
|
File size:
377 bytes
|
Line | |
---|
1 | #version 150 |
---|
2 | |
---|
3 | uniform sampler2D RT; |
---|
4 | in vec2 oUv0; |
---|
5 | out vec4 fragColour; |
---|
6 | |
---|
7 | void 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.