API

Function PrepareDefinesForLight

  • Prepares the defines related to the light information passed in parameter

    Parameters

    • scene: Scene

      The scene we are intending to draw

    • mesh: AbstractMesh

      The mesh the effect is compiling for

    • light: Light

      The light the effect is compiling for

    • lightIndex: number

      The index of the light

    • defines: any

      The defines to update

    • specularSupported: boolean

      Specifies whether specular is supported or not (override lights data)

    • state: {
          lightmapMode: boolean;
          needNormals: boolean;
          needRebuild: boolean;
          shadowEnabled: boolean;
          specularEnabled: boolean;
      }

      Defines the current state regarding what is needed (normals, etc...)

    Returns void