Line | |
---|
1 | float4 ambientColour;
|
---|
2 | float4 lightPosition;
|
---|
3 | float distanceScale;
|
---|
4 | float4x4 proj_matrix;
|
---|
5 | float4x4 worldmatrix;
|
---|
6 | float time_0_X;
|
---|
7 | //float4 ambient_light;
|
---|
8 |
|
---|
9 |
|
---|
10 | struct VS_OUTPUT {
|
---|
11 | float4 Pos: POSITION;
|
---|
12 | float Depth: TEXCOORD2;
|
---|
13 | float3 texCoord: TEXCOORD0;
|
---|
14 | float3 texCoordNormalized: TEXCOORD1;
|
---|
15 | float4 Color: COLOR0;
|
---|
16 | };
|
---|
17 |
|
---|
18 | VS_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.