Rev | Line | |
---|
[2270] | 1 |
|
---|
| 2 | // gametools
|
---|
| 3 | #include \
|
---|
| 4 | <levelutil/shader/prog/d3d9_hlsl/include_stddef_d3d9_hlsl.s3d_shadercode_run>
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 | struct VS_INPUT
|
---|
| 8 | {
|
---|
| 9 | float4 posObj: POSITION;
|
---|
| 10 | S3D_BONE_DECL_STD(boneWgh, boneSubscr)
|
---|
| 11 | };
|
---|
| 12 |
|
---|
| 13 | struct VS_OUTPUT
|
---|
| 14 | {
|
---|
| 15 | float4 posScr: POSITION;
|
---|
| 16 | float3 viewVec: TEXCOORD1;
|
---|
| 17 | };
|
---|
| 18 |
|
---|
| 19 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 20 |
|
---|
| 21 | const float4x4 projMat;
|
---|
| 22 | const float4x4 matView;
|
---|
| 23 |
|
---|
| 24 | S3D_MATBONE_DECL_STD(matBone)
|
---|
| 25 |
|
---|
| 26 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 27 | // Vertexshader
|
---|
| 28 | // Profile: 2x0
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | VS_OUTPUT main(VS_INPUT input)
|
---|
| 32 | {
|
---|
| 33 | VS_OUTPUT output = (VS_OUTPUT)0;
|
---|
| 34 |
|
---|
| 35 | float4x4 matBoneFinal;
|
---|
| 36 | S3D_BONE_TRANSF_STD(
|
---|
| 37 | matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
|
---|
| 38 | // Transform vectors by matBoneFinal
|
---|
| 39 |
|
---|
| 40 | float4 posView = mul(input.posObj, matBoneFinal);
|
---|
| 41 |
|
---|
| 42 | output.posScr = mul(posView, projMat);
|
---|
| 43 | output.viewVec = posView;
|
---|
| 44 | return output;
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.