API

Function AreLightsTexturesReady

  • 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's maxSimultaneousLights cap and the disableLighting flag.

    Parameters

    • 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