|
发表于 2004-8-5 16:24:00
|
显示全部楼层
Re:怎样自己制造灯光?
Dim light_r As D3DLIGHT8
light_r.Type = D3DLIGHT_POINT
light_r.diffuse.r = 1
light_r.diffuse.G = 1
light_r.diffuse.B = 1
light_r.diffuse.A = 0
light_r.Ambient.r = 0
light_r.Ambient.G = 0
light_r.Ambient.B = 0
light_r.Ambient.A = 0
light_r.specular.r = 0
light_r.specular.G = 0
light_r.specular.B = 0
light_r.specular.A = 0
light_r.Range = 99999
light_r.Position.x = 0
light_r.Position.y = 0
light_r.Position.z = -500
light_r.Attenuation0 = 1
light_r.Attenuation1 = 0
light_r.Attenuation2 = 0
g_dev.SetLight 0, light_r
g_dev.LightEnable 0, True
g_dev.SetRenderState D3DRS_LIGHTING, True
|
|