Function AreLightsTexturesReady
-
AreLightsTexturesReady(
scene: Scene,
mesh: AbstractMesh,
maxSimultaneousLights: number,
disableLighting?: boolean,
): booleanParameters
- scene: Scene
The scene the mesh belongs to
- mesh: AbstractMesh
The mesh to check
- maxSimultaneousLights: number
The material's max simultaneous lights cap
- disableLighting: boolean = false
Whether lighting is disabled for the material
Returns boolean
true if all affecting lights report their textures are ready
- scene: Scene
Checks whether the texture resources used by the lights that will affect the given mesh are ready. This mirrors the light iteration performed by PrepareDefinesForLights and BindLights: it only considers lights that can affect the mesh (already filtered into
mesh.lightSources) and respects the material'smaxSimultaneousLightscap and thedisableLightingflag.