Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Cg/GrayScale.cg @ 12189

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

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

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