Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/skybox/Media/materials/programs/GrayScale.cg @ 883

Last change on this file since 883 was 390, checked in by landauf, 17 years ago

added materials

File size: 487 bytes
RevLine 
[390]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.