每盏灯都可以有镜面反射,最多支持三盏灯,再多就不能使用ps2_0,附上HLSL代码和执行文件,自己玩吧^_^

 

 

XNA 多光源镜面反射 

 1XNA 多光源镜面反射float4x4 World;
 2XNA 多光源镜面反射float4x4 View;
 3XNA 多光源镜面反射float4x4 Projection;
 4XNA 多光源镜面反射float4x4 WorldViewProjection;
 5XNA 多光源镜面反射float3 EyePosition;
 6XNA 多光源镜面反射
 7XNA 多光源镜面反射#define MaxLights 3
 8XNA 多光源镜面反射
 9XNA 多光源镜面反射float3 LightDirs[MaxLights];
10XNA 多光源镜面反射float4 LightColors[MaxLights];
11XNA 多光源镜面反射int LightCount;
12XNA 多光源镜面反射
13XNA 多光源镜面反射float4 AmbientColor = float4(0.05,0.05,0.05,1);
14XNA 多光源镜面反射float SpecularPower = 16;
15XNA 多光源镜面反射
16XNA 多光源镜面反射texture Texture;
17XNA 多光源镜面反射sampler TextureSampler = sampler_state
18

 

转载请注明出处:

作者:gogoplayer

E-mail : gogoplayer@163.com

QQ : 78939328

http://www.gogoplayer.com.cn

相关文章: