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

Revision 2196, 1.6 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
14struct VS_INPUT
15{
16    float4 posObj: POSITION;
17    float2 mainTexCoord: TEXCOORD0;
18};
19
20struct VS_OUTPUT
21{
22    float4 posScr: POSITION;
23    float fog: FOG;
24    float4 diffuse: COLOR0;
25    float2 mainTexCoord: TEXCOORD0;
26    float2 offsScale: TEXCOORD1;
27};
28
29///////////////////////////////////////////////////////////////////////////////
30
31const float4x4 matProjView;
32const float4x4 matView;
33const float4 mtrlEmissive;
34const float4 tex0RcpSize;
35
36///////////////////////////////////////////////////////////////////////////////
37// Vertexshader
38// Profile: 1x1
39
40VS_OUTPUT main( VS_INPUT input )
41{
42    VS_OUTPUT output = (VS_OUTPUT)0;
43
44    //Transform position to clip space
45    output.posScr = mul(input.posObj, matProjView);
46
47    //Transform position to eye space -> pos
48    float4 posView = mul(input.posObj, matView);
49
50    //fog
51    output.fog = posView.z / posView.w;
52
53    //Color
54    output.diffuse = mtrlEmissive;
55
56    output.mainTexCoord = input.mainTexCoord;
57
58    output.offsScale = tex0RcpSize;
59
60    return output;
61}
62
63///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.