每盏灯都可以有镜面反射,最多支持三盏灯,再多就不能使用ps2_0,附上HLSL代码和执行文件,自己玩吧^_^
1
float4x4 World;
2
float4x4 View;
3
float4x4 Projection;
4
float4x4 WorldViewProjection;
5
float3 EyePosition;
6
7
#define MaxLights 3
8
9
float3 LightDirs[MaxLights];
10
float4 LightColors[MaxLights];
11
int LightCount;
12
13
float4 AmbientColor = float4(0.05,0.05,0.05,1);
14
float SpecularPower = 16;
15
16
texture Texture;
17
sampler TextureSampler = sampler_state
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
转载请注明出处:
作者:gogoplayer
E-mail : gogoplayer@163.com
QQ : 78939328