source: trunk/VUT/GtpVisibilityPreprocessor/src/dual_depth.cg @ 528

Revision 528, 739 bytes checked in by mattausch, 19 years ago (diff)
Line 
1struct fragment
2{
3        float4 position  : POSITION;    //screen position
4        float4 color0    : COLOR0;
5        float4 color1    : COLOR1;              //lighting
6        float2 texcoord0 : TEXCOORD0;
7        float4 depthTexCoord: TEXCOORD1;
8        float3 normal    : TEXCOORD2;
9};
10
11
12struct pixel
13{
14        float4 color : COLOR;   
15};
16
17
18pixel main(fragment IN,   
19           uniform sampler2D shadowMap: TEXUNIT1,
20           uniform float doTexturing)
21{
22        pixel OUT;
23       
24        float4 col = IN.color0;
25       
26        // the depth buffer     
27        float4 depth = tex2Dproj(shadowMap, IN.depthTexCoord);
28        float test = IN.depthTexCoord.z / IN.depthTexCoord.w;
29        // reject by alpha test
30        //if (test < depth.x)
31        //      OUT.color[4] = 0;
32               
33        //OUT.color = localcolor * shadow * IN.color1;
34
35        return OUT;
36}
Note: See TracBrowser for help on using the repository browser.