|Now is the time to speak about lights and fog
The special effects like lights and fog can give great realism to our
scenes , although they consume many resources.
DirectX have some lights and fog types .
D3DRMLIGHT_DIRECTIONAL , is a frame- line in the 3d space, irradiates
light in one address, their rays are parallel .
D3DRMLIGHT_POINT , is a point light in the 3d space , irradiates
equally in all the addresses.
D3DRMLIGHT_SPOT, they are 2 cones of light, a cone indicates
the umbra and the other one the dimness
D3DRMFOG_EXPONENTIAL , it increases the fog in way expotencia.
D3DRMFOG_EXPONENTIALSQUARED, similar to D3DRMFOG_EXPONENTIAL, but
increase more speed.
D3DRMFOG_LINEAR , increases lineally ,really only this type is suported
The fog always as linked to the master frame.
SORGO I.D. had created a function for activate any light ,and
other to activate the fog
somelight(red As Single, green As Single, blue
As Single, tipelight As Integer, umbra As Single, penumbra As Single)
red , is the red colour componet
greend, the green colour componet
blue , the blue
tipelight is a 1 to 3 number 1=D3DRMLIGHT_DIRECTIONAL,2=D3DRMLIGHT_SPOT,3=D3DRMLIGHT_POINT
umbra is the first light cone (only actue in the Spot type)
penumbra is the secon cone (only actue in the Spot type)
Fog(colour As Single, starfog As Single, endfog
As Single, density As Single, fogEnable As Boolean)
Colour is a fog colour 0-65000
starfog the distance between your and thefog
endfog the longitude of the fog
dendity the fog density
fogEnable Active or disable the fog