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 | float4 color: COLOR0;
|
---|
25 | };
|
---|
26 |
|
---|
27 | struct VS_OUTPUT
|
---|
28 | {
|
---|
29 | float4 posScr: POSITION;
|
---|
30 | float2 texCoord0: TEXCOORD0;
|
---|
31 | float2 texCoord1: TEXCOORD1;
|
---|
32 | float4 diffuse: COLOR0;
|
---|
33 | };
|
---|
34 |
|
---|
35 | ///////////////////////////////////////////////////////////////////////////////
|
---|
36 |
|
---|
37 | const float4x4 matProj;
|
---|
38 | const float4x4 matView;
|
---|
39 | const float4 mtrlEmissive;
|
---|
40 |
|
---|
41 | ///////////////////////////////////////////////////////////////////////////////
|
---|
42 | // Vertexshader
|
---|
43 | // Profile: 2x0
|
---|
44 |
|
---|
45 | VS_OUTPUT main(VS_INPUT input)
|
---|
46 | {
|
---|
47 | VS_OUTPUT output = (VS_OUTPUT)0;
|
---|
48 |
|
---|
49 | output.posScr = mul(input.posObj, matView);
|
---|
50 | output.posScr = mul(output.posScr, matProj);
|
---|
51 | output.diffuse = input.color;
|
---|
52 | output.texCoord0 = input.color.xy;
|
---|
53 | output.texCoord1 = float2(input.texCoord0.x, 1.0 - input.texCoord0.y);
|
---|
54 | return output;
|
---|
55 | }
|
---|
56 |
|
---|
57 | ///////////////////////////////////////////////////////////////////////////////
|
---|