Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Example/Cg/DitherFP.cg @ 12083

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

Reorganised shader programs

File size: 364 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.