source: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/Shark3D/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_direct_texturing_d3d9_hlsl_ps2x0.s3d_shadercode.bak @ 2517

Revision 2517, 1.1 KB checked in by igarcia, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2006 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14struct PS_INPUT
15{
16    float2 texCoord0: TEXCOORD0;
17    float2 depthScr: TEXCOORD1;
18};
19
20///////////////////////////////////////////////////////////////////////////////
21// Pixelshader
22// Profile: 2x0
23
24sampler tex0: register(s0);
25
26float4 main(PS_INPUT input): COLOR0
27{
28        float fragDepth = clamp(input.depthScr.x / input.depthScr.y, 0, 1);
29        if (tex2D(tex0, input.texCoord0).w != 0.0)
30        {
31           //return fragDepth.x;
32           return fragDepth.x * tex2D(tex0, input.texCoord0).w;
33        }
34        //else
35        //{
36        //   //discard;
37        //   clip(-1.0);
38        //} 
39}
40
41///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.