/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2006 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// struct VS_INPUT { float4 posObj: POSITION; float2 tex0:TEXCOORD0; // float2 tex1:TEXCOORD1; float3 normal:NORMAL; }; struct VS_OUTPUT { float4 posScr: POSITION; float3 tex0:TEXCOORD0; float3 normal:TEXCOORD1; }; /////////////////////////////////////////////////////////////////////////////// const float4x4 matProjView; const float4x4 matView; const float4x4 matViewInvTrans; /////////////////////////////////////////////////////////////////////////////// // Vertexshader // Profile: 1x1 VS_OUTPUT main(VS_INPUT input) { VS_OUTPUT output = (VS_OUTPUT)0; output.posScr = mul(input.posObj, matProjView); output.tex0 = -mul(input.posObj.xyz, matView); output.normal = mul(input.normal, matViewInvTrans); //output.tex0 = input.tex0; //output.tex1 = input.tex1; return output; } ///////////////////////////////////////////////////////////////////////////////