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

Revision 1493, 1.2 KB checked in by igarcia, 18 years ago (diff)
Line 
1void main(float4 Pos: POSITION,
2               float3 Norm: NORMAL,
3               float3 texCoord: TEXCOORD0,
4               float3 texCoordNormalized: TEXCOORD1,
5               uniform float4 lightPosition,
6               uniform float4 ambientColour,
7               uniform float4x4 proj_matrix,
8               uniform float4x4 worldmatrix,
9               out float4 opos: POSITION,
10               out float3 otexCoord: TEXCOORD0,
11               out float3 otexCoordNormalized: TEXCOORD1,
12               out float4 olightvec: TEXCOORD2)
13{
14   // Project it. For this sample using the normal projection
15   // matrix suffices, however, real applications will typically
16   // use a separate projection matrix for each light depending
17   // on its properties such as FOV and range. 
18   float4 world_pos = mul(worldmatrix,Pos);
19   float4x4 matrixTest;
20   matrixTest[0] = float4(0.0,0.0,0.0,0.0);
21   matrixTest[1] = float4(0.0,0.0,0.0,0.0);
22   matrixTest[2] = float4(0.0,0.0,0.0,0.0);
23   matrixTest[3] = float4(0.0,0.0,0.0,0.0);
24   opos = float4(0.0,0.0,0.0,0.0);  //mul(matrixTest,world_pos);
25   //opos = mul(proj_matrix,world_pos);
26   olightvec = lightPosition - world_pos;
27   otexCoord = texCoord;
28   otexCoordNormalized = texCoordNormalized;
29}
30
31
Note: See TracBrowser for help on using the repository browser.