source:
data/branches/Shader_HS18/programs/Example/GLSL150/DitherFP.glsl
@
12083
Last change on this file since 12083 was 12083, checked in by wiesep, 6 years ago | |
---|---|
File size: 305 bytes |
Line | |
---|---|
1 | #version 150 |
2 | |
3 | uniform sampler2D RT; |
4 | uniform sampler2D noise; |
5 | in vec2 oUv0; |
6 | |
7 | out vec4 fragColour; |
8 | |
9 | void main() |
10 | { |
11 | float c = dot(texture(RT, oUv0), vec4(0.30, 0.11, 0.59, 0.00)); |
12 | float n = texture(noise, oUv0).r * 2.0 - 1.0; |
13 | c += n; |
14 | |
15 | c = step(c, 0.5); |
16 | |
17 | fragColour = vec4(c,c,c,1.0); |
18 | } |
Note: See TracBrowser
for help on using the repository browser.