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 | #include \
|
---|
15 | <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
|
---|
16 |
|
---|
17 | ///////////////////////////////////////////////////////////////////////////////
|
---|
18 |
|
---|
19 | struct VS_INPUT
|
---|
20 | {
|
---|
21 | float4 posObj: POSITION;
|
---|
22 | float2 texCoord0: TEXCOORD0;
|
---|
23 | float2 texCoord1: TEXCOORD1;
|
---|
24 | float2 color: COLOR0;
|
---|
25 | };
|
---|
26 |
|
---|
27 | struct VS_OUTPUT
|
---|
28 | {
|
---|
29 | float4 posScr: POSITION;
|
---|
30 | float2 texCoord0: TEXCOORD0;
|
---|
31 | float2 texCoord1: TEXCOORD1;
|
---|
32 | float2 depthScr: TEXCOORD2;
|
---|
33 | };
|
---|
34 |
|
---|
35 | ///////////////////////////////////////////////////////////////////////////////
|
---|
36 |
|
---|
37 | const float4x4 projMat;
|
---|
38 | const float4x4 matView;
|
---|
39 |
|
---|
40 | ///////////////////////////////////////////////////////////////////////////////
|
---|
41 | // Vertexshader
|
---|
42 | // Profile: 2x0
|
---|
43 |
|
---|
44 | VS_OUTPUT main(VS_INPUT input)
|
---|
45 | {
|
---|
46 | VS_OUTPUT output = (VS_OUTPUT)0;
|
---|
47 |
|
---|
48 | float4 viewPos = mul(input.posObj, matView);
|
---|
49 | output.posScr = mul(viewPos, projMat);
|
---|
50 | output.depthScr.xy = output.posScr.zw;
|
---|
51 |
|
---|
52 | output.texCoord1 = input.texCoord0;
|
---|
53 | output.texCoord0 = input.color;
|
---|
54 |
|
---|
55 | return output;
|
---|
56 | }
|
---|
57 |
|
---|
58 | ///////////////////////////////////////////////////////////////////////////////
|
---|