/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2006 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// struct VS_INPUT { float4 posObj: POSITION; float2 mainTexCoord: TEXCOORD0; }; struct VS_OUTPUT { float4 posScr: POSITION; float fog: FOG; float4 diffuse: COLOR0; float2 mainTexCoord: TEXCOORD0; }; /////////////////////////////////////////////////////////////////////////////// const float4x4 matProjView; const float4x4 matView; const float4 mtrlEmissive; /////////////////////////////////////////////////////////////////////////////// // Vertexshader // Profile: 1x1 VS_OUTPUT main( VS_INPUT input ) { VS_OUTPUT output = (VS_OUTPUT)0; //Transform position to clip space output.posScr = mul(input.posObj, matProjView); //Transform position to eye space -> pos float4 posView = mul(input.posObj, matView); //fog output.fog = posView.z / posView.w; //Color output.diffuse = mtrlEmissive; output.mainTexCoord = input.mainTexCoord; return output; } ///////////////////////////////////////////////////////////////////////////////