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 |
|
---|
14 | struct PS_INPUT
|
---|
15 | {
|
---|
16 | float2 depthScr: TEXCOORD0;
|
---|
17 | };
|
---|
18 |
|
---|
19 | ///////////////////////////////////////////////////////////////////////////////
|
---|
20 | // Pixelshader
|
---|
21 | // Profile: 2x0
|
---|
22 |
|
---|
23 | float4 main(PS_INPUT input): COLOR0
|
---|
24 | {
|
---|
25 | float2 depthScr = input.depthScr;
|
---|
26 | float fragDepth = clamp(depthScr.x / depthScr.y, 0, 1);
|
---|
27 | return fragDepth;
|
---|
28 | }
|
---|
29 |
|
---|
30 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.