Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/Tutorial/Media/materials/programs/GrayScale.cg @ 44

Last change on this file since 44 was 44, checked in by bknecht, 17 years ago

merge from tutorial branche to trunk

File size: 487 bytes
Line 
1sampler RT : register(s0);
2
3float4 GrayScale_ps(float2 iTexCoord : TEXCOORD0) : COLOR
4{
5    float3 greyscale = dot(tex2D(RT, iTexCoord).rgb, float3(0.3, 0.59, 0.11));
6        return float4(greyscale, 1.0);
7}
8
9float4 Embossed_ps(float2 iTexCoord : TEXCOORD0) : COLOR
10{
11    float4 Color;
12    Color.a = 1.0f;
13    Color.rgb = 0.5f;
14    Color -= tex2D( RT, iTexCoord - 0.001)*2.0f;
15    Color += tex2D( RT, iTexCoord + 0.001)*2.0f;
16    Color.rgb = (Color.r+Color.g+Color.b)/3.0f;
17    return Color;
18}
Note: See TracBrowser for help on using the repository browser.