Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/data_extern/programs/Cg/DitherFP.cg

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

Changed folder structure, deletet some unused files and cleaned up code

File size: 346 bytes
Line 
1sampler2D RT : register(s0);
2sampler2D pattern : register(s1);
3
4half4 Dither_ps(float4 pos : POSITION, float2 TexCoord : TEXCOORD0) : COLOR
5{       
6        half c = dot(tex2D(RT, TexCoord),half4(0.30,0.11,0.59,0.00));
7        half n = tex2D(pattern, TexCoord).r*2 - 1.0;
8        c += n;
9        if (c > 0.5)
10        {
11                c = 0.0;
12        }
13        else
14        {
15                c = 1.0;
16        }   
17        return half4(c,c,c,1.0);
18}
Note: See TracBrowser for help on using the repository browser.