source: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/IllumDemo/src/res/levelutil/shader/prog/d3d9_hlsl/gen_shmap_d3d9_hlsl_vs2x0.s3d_shadercode @ 2196

Revision 2196, 1.5 KB checked in by szirmay, 17 years ago (diff)
Line 
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
19struct VS_INPUT
20{
21    float4 posObj: POSITION;
22    S3D_BONE_DECL_STD(boneWgh, boneSubscr)
23};
24
25struct VS_OUTPUT
26{
27    float4 posScr: POSITION;
28    float2 depthScr: TEXCOORD0;
29};
30
31///////////////////////////////////////////////////////////////////////////////
32
33const float4x4 projMat;
34S3D_MATBONE_DECL_STD(matBone)
35
36///////////////////////////////////////////////////////////////////////////////
37// Vertexshader
38// Profile: 2x0
39
40VS_OUTPUT main(VS_INPUT input)
41{
42    VS_OUTPUT output = (VS_OUTPUT)0;
43    float4x4 matBoneFinal;
44    S3D_BONE_TRANSF_STD(
45            matBoneFinal, matBone, input.boneWgh, input.boneSubscr);
46
47    float4 viewPos = mul(input.posObj, matBoneFinal);
48    output.posScr = mul(viewPos, projMat);
49    output.depthScr.xy = output.posScr.zw;
50    return output;
51}
52
53///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.