Rev | Line | |
---|
[2196] | 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 | S3D_BONE_DECL_STD(boneWgh, boneSubscr)
|
---|
| 23 | float4 diffuse: COLOR0;
|
---|
| 24 | };
|
---|
| 25 |
|
---|
| 26 | struct VS_OUTPUT
|
---|
| 27 | {
|
---|
| 28 | float4 posScr: POSITION;
|
---|
| 29 | float4 diffuse: COLOR0;
|
---|
| 30 | };
|
---|
| 31 |
|
---|
| 32 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 33 |
|
---|
| 34 | const float4x4 projMat;
|
---|
| 35 | const float4x4 matView;
|
---|
| 36 |
|
---|
| 37 | S3D_MATBONE_DECL_STD(matBone)
|
---|
| 38 |
|
---|
| 39 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 40 | // Vertexshader
|
---|
| 41 | // Profile: 2x0
|
---|
| 42 |
|
---|
| 43 | VS_OUTPUT main(VS_INPUT input)
|
---|
| 44 | {
|
---|
| 45 | VS_OUTPUT output = (VS_OUTPUT)0;
|
---|
| 46 |
|
---|
| 47 | float4x4 matBoneFinal;
|
---|
| 48 | S3D_BONE_TRANSF_STD(
|
---|
| 49 | matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
|
---|
| 50 | // Transform vectors by matBoneFinal
|
---|
| 51 | float4 posView = mul(input.posObj, matBoneFinal);
|
---|
| 52 |
|
---|
| 53 | output.posScr = mul(posView, projMat);
|
---|
| 54 | output.diffuse = input.diffuse;
|
---|
| 55 |
|
---|
| 56 | return output;
|
---|
| 57 | }
|
---|
| 58 |
|
---|
| 59 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.