Class LightConstants
Index
Constructors
Properties
Methods
Constructors
constructor
-
Returns LightConstants
Properties
Static ReadonlyFALLOFF_ DEFAULT
Falloff Default: light is falling off following the material specification: standard material is using standard falloff whereas pbr material can request special falloff per materials.
Static ReadonlyFALLOFF_ GLTF
Falloff gltf: light is falling off as described in the gltf moving to PBR document to enhance interoperability with other engines.
Static ReadonlyFALLOFF_ PHYSICAL
Falloff Physical: light is falling off following the inverse squared distance law.
Static ReadonlyFALLOFF_ STANDARD
Falloff Standard: light is falling off like in the standard material to enhance interoperability with other materials.
Static ReadonlyINTENSITYMODE_ AUTOMATIC
Each light type uses the default quantity according to its type: point/spot lights use luminous intensity directional lights use illuminance
Static ReadonlyINTENSITYMODE_ ILLUMINANCE
lux (lm/m^2)
Static ReadonlyINTENSITYMODE_ LUMINANCE
nit (cd/m^2)
Static ReadonlyINTENSITYMODE_ LUMINOUSINTENSITY
candela (lm/sr)
Static ReadonlyINTENSITYMODE_ LUMINOUSPOWER
lumen (lm)
Static ReadonlyLIGHTMAP_ DEFAULT
If every light affecting the material is in this lightmapMode, material.lightmapTexture adds or multiplies (depends on material.useLightmapAsShadowmap) after every other light calculations.
Static ReadonlyLIGHTMAP_ SHADOWSONLY
material.lightmapTexture as only lighting no light calculation from this light only adds dynamic shadows from this light
Static ReadonlyLIGHTMAP_ SPECULAR
material.lightmapTexture as only diffuse lighting from this light adds only specular lighting from this light adds dynamic shadows
Static ReadonlyLIGHTTYPEID_ CLUSTERED_ CONTAINER
Light type const id of the clustered light.
Static ReadonlyLIGHTTYPEID_ DIRECTIONALLIGHT
Light type const id of the directional light.
Static ReadonlyLIGHTTYPEID_ HEMISPHERICLIGHT
Light type const id of the hemispheric light.
Static ReadonlyLIGHTTYPEID_ POINTLIGHT
Light type const id of the point light.
Static ReadonlyLIGHTTYPEID_ RECT_ AREALIGHT
Light type const id of the area light.
Static ReadonlyLIGHTTYPEID_ SPOTLIGHT
Light type const id of the spot light.
Methods
StaticCompare Lights Priority
-
Sort function to order lights for rendering.
Parameters
- a: ISortableLight
First Light object to compare to second.
- b: ISortableLight
Second Light object to compare first.
Returns number
-1 to reduce's a's index relative to be, 0 for no change, 1 to increase a's index relative to b.
- a: ISortableLight
Defines the cross module constantsused by lights to avoid circular dependencies