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 | float4 diffuse: COLOR0;
|
---|
17 | float2 mainTexCoord: TEXCOORD0;
|
---|
18 | float3 viewVec: TEXCOORD1;
|
---|
19 | };
|
---|
20 |
|
---|
21 |
|
---|
22 | struct PS_OUTPUT
|
---|
23 | {
|
---|
24 | float4 color: COLOR;
|
---|
25 | float4 distance: COLOR1;
|
---|
26 | };
|
---|
27 |
|
---|
28 | ///////////////////////////////////////////////////////////////////////////////
|
---|
29 |
|
---|
30 | sampler tex0: register(s0);
|
---|
31 |
|
---|
32 | ///////////////////////////////////////////////////////////////////////////////
|
---|
33 | // Pixelshader
|
---|
34 | // Profile: 2x0
|
---|
35 |
|
---|
36 | PS_OUTPUT main(PS_INPUT input)
|
---|
37 | {
|
---|
38 | PS_OUTPUT output;
|
---|
39 |
|
---|
40 | output.color = tex2D(tex0, input.mainTexCoord) * input.diffuse;
|
---|
41 | output.distance = float4(length(input.viewVec), 0, 0, 0);
|
---|
42 |
|
---|
43 | return output;
|
---|
44 | }
|
---|
45 |
|
---|
46 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.