kick.scene.SceneLights Class
Datastructure used pass light information
Constructor
kick.scene.SceneLights
-
maxNumerOfLights
Parameters:
-
maxNumerOfLights
Number(value from config)
Item Index
Methods
recomputeLight
-
viewMatrix
Recompute the light based on the view-matrix. This method is called from the camera when the scene is rendered, to transform the light into eye coordinates and compute the half vector for directional light
Parameters:
-
viewMatrix
kick.math.Mat4
resetPointLight
-
index
Set the point light to have not contribution this means setting the position 1,1,1, the color to 0,0,0
and attenuation to 1,0,0.
This is needed since the ecLight position would otherwise be in 0,0,0 which is invalid
Parameters:
-
index
Numberof point light
Properties
directionalLightData
kick.math.Mat3
Matrix of directional light data. Column 1 contains the light-direction in eye space, column 2 color intensity and column 3 half vector
pointLightData
Array of Mat3
Matrices of point light data. Each matrix (mat3) contains:
Column 1 vector: point light position in eye coordinates
Column 2 vector: color intensity
Column 3 vector: attenuation vector