Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Example/GLSLES/DitherFP.glsles @ 12091

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

Updated programs and adjusted Material to work with GLSL>150

File size: 379 bytes
Line 
1#version 100
2
3precision mediump int;
4precision mediump float;
5
6uniform sampler2D RT;
7uniform sampler2D noise;
8varying vec2 oUv0;
9//varying vec2 oUv1;
10
11void main()
12{
13        float c = dot(texture2D(RT, oUv0), vec4(0.30, 0.11, 0.59, 0.00));
14        float n = texture2D(noise, oUv0).r*2.0 - 1.0;
15        c += n;
16        if (c > 0.5)
17        {
18                c = 0.0;
19        }
20        else
21        {
22                c = 1.0;
23        }   
24        gl_FragColor = vec4(c,c,c,1.0);
25}
Note: See TracBrowser for help on using the repository browser.