Rev | Line | |
---|
[2270] | 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 VS_INPUT
|
---|
| 15 | {
|
---|
| 16 | float4 posObj: POSITION;
|
---|
| 17 | float2 tex0:TEXCOORD0;
|
---|
| 18 | // float2 tex1:TEXCOORD1;
|
---|
| 19 | float3 normal:NORMAL;
|
---|
| 20 | };
|
---|
| 21 |
|
---|
| 22 | struct VS_OUTPUT
|
---|
| 23 | {
|
---|
| 24 | float4 posScr: POSITION;
|
---|
| 25 | float3 tex0:TEXCOORD0;
|
---|
| 26 | float3 normal:TEXCOORD1;
|
---|
| 27 | };
|
---|
| 28 |
|
---|
| 29 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 30 |
|
---|
| 31 | const float4x4 matProjView;
|
---|
| 32 | const float4x4 matView;
|
---|
| 33 | const float4x4 matViewInvTrans;
|
---|
| 34 |
|
---|
| 35 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 36 | // Vertexshader
|
---|
| 37 | // Profile: 1x1
|
---|
| 38 |
|
---|
| 39 | VS_OUTPUT main(VS_INPUT input)
|
---|
| 40 | {
|
---|
| 41 | VS_OUTPUT output = (VS_OUTPUT)0;
|
---|
| 42 |
|
---|
| 43 | output.posScr = mul(input.posObj, matProjView);
|
---|
| 44 | output.tex0 = -mul(input.posObj.xyz, matView);
|
---|
| 45 | output.normal = mul(input.normal, matViewInvTrans);
|
---|
| 46 |
|
---|
| 47 | //output.tex0 = input.tex0;
|
---|
| 48 | //output.tex1 = input.tex1;
|
---|
| 49 | return output;
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.