/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2006 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// #include \ /////////////////////////////////////////////////////////////////////////////// struct VS_INPUT { float4 posObj: POSITION; S3D_BONE_DECL_STD(boneWgh, boneSubscr) float4 diffuse: COLOR0; }; struct VS_OUTPUT { float4 posScr: POSITION; float4 diffuse: COLOR0; }; /////////////////////////////////////////////////////////////////////////////// const float4x4 projMat; const float4x4 matView; S3D_MATBONE_DECL_STD(matBone) /////////////////////////////////////////////////////////////////////////////// // Vertexshader // Profile: 2x0 VS_OUTPUT main(VS_INPUT input) { VS_OUTPUT output = (VS_OUTPUT)0; float4x4 matBoneFinal; S3D_BONE_TRANSF_STD( matBoneFinal, matBone, input.boneWgh, input.boneSubscr); // Transform vectors by matBoneFinal float4 posView = mul(input.posObj, matBoneFinal); output.posScr = mul(posView, projMat); output.diffuse = input.diffuse; return output; } ///////////////////////////////////////////////////////////////////////////////