Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/programs/GrayScale.cg @ 8809

Last change on this file since 8809 was 7708, checked in by dafrick, 14 years ago

Merging cleanup branch. You will need to update your data repository as well as your local copy of the code.

  • Property svn:eol-style set to native
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.