Class ShaderVariation

Contains information about a single variation of a Shader. Each variation can have a separate set of #defines that control shader compilation.

Hierarchy

  • FrameworkObject
    • ShaderVariation

Constructors

  • Parameters

    • OptionalisInternalConstructor: boolean

    Returns ShaderVariation

Accessors

  • get paramNames(): Iterable<string>
  • Returns a list of names of all registered parameters.

    Returns Iterable<string>

Methods

  • Removes all parameters.

    Returns void

  • Returns the value of a boolean parameter with the specified name. Returns false if the parameter cannot be found.

    Parameters

    • name: string

    Returns boolean

  • Returns the value of a float parameter with the specified name. Returns 0 if the parameter cannot be found.

    Parameters

    • name: string

    Returns number

  • Returns the value of a signed integer parameter with the specified name. Returns 0 if the parameter cannot be found.

    Parameters

    • name: string

    Returns number

  • Returns the value of a unsigned integer parameter with the specified name. Returns 0 if the parameter cannot be found.

    Parameters

    • name: string

    Returns number

  • Checks if the variation has a parameter with the specified name.

    Parameters

    • paramName: string

    Returns boolean

  • Removes a parameter with the specified name.

    Parameters

    • paramName: string

    Returns void

  • Sets the value of the parameter for the provided name. Any previous value for a parameter with the same name will be overwritten.

    Parameters

    • name: string
    • value: boolean

    Returns void

  • Sets the value of the parameter for the provided name. Any previous value for a parameter with the same name will be overwritten.

    Parameters

    • name: string
    • value: number

    Returns void

  • Sets the value of the parameter for the provided name. Any previous value for a parameter with the same name will be overwritten.

    Parameters

    • name: string
    • value: number

    Returns void

  • Sets the value of the parameter for the provided name. Any previous value for a parameter with the same name will be overwritten.

    Parameters

    • name: string
    • value: number

    Returns void