source: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/OGRE/IBRTreesOGRE/media/oldgeneral/depth_tree_leaves_vp.shd.bak @ 1493

Revision 1493, 1016 bytes checked in by igarcia, 18 years ago (diff)
Line 
1float4 ambientColour;
2float4 lightPosition;
3float distanceScale;
4float4x4 proj_matrix;
5float4x4 worldmatrix;
6float time_0_X;
7//float4 ambient_light;
8
9
10struct VS_OUTPUT {
11   float4 Pos: POSITION;
12   float  Depth: TEXCOORD2;
13   float3 texCoord: TEXCOORD0;
14   float3 texCoordNormalized: TEXCOORD1;
15   float4 Color: COLOR0;
16};
17
18VS_OUTPUT main(float4 Pos: POSITION, float3 Norm: NORMAL, float3 texCoord: TEXCOORD0, float3 texCoordNormalized: TEXCOORD1)
19{
20   VS_OUTPUT Out;
21
22   // Project it. For this sample using the normal projection
23   // matrix suffices, however, real applications will typically
24   // use a separate projection matrix for each light depending
25   // on its properties such as FOV and range. 
26   Out.Pos = mul(Pos, proj_matrix);
27   float4 world_pos = mul(Pos, worldmatrix);
28   Out.Depth = length(lightPosition.xyz -Pos.xyz);
29   Out.texCoord = texCoord;
30   Out.texCoordNormalized = texCoordNormalized;
31   Out.Color = float4(0.0,1.0,0.0,1.0);
32   
33   return Out;
34}
35
36
Note: See TracBrowser for help on using the repository browser.