Interface ShaderEmitter.Inputs

Enclosing class:
ShaderEmitter

public static interface ShaderEmitter.Inputs
Supplies the backend's spelling of the inputs a graph reads.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the expression for a built-in input such as worldPos, or null when the stage being emitted does not have it.
    sample(int slot, String uv)
    Returns the expression sampling custom texture slot at uv, or null when the stage cannot sample.
    uniform(int slot)
    Returns the expression for slot slot of the material's uniform array, a four float value of which the graph reads the first components.
  • Method Details

    • builtin

      String builtin(String name)

      Returns the expression for a built-in input such as worldPos, or null when the stage being emitted does not have it.

      Parameters
      • name: the built-in's name, as the ShaderNode factories use it
      Returns

      the expression, or null

    • uniform

      String uniform(int slot)

      Returns the expression for slot slot of the material's uniform array, a four float value of which the graph reads the first components.

      Parameters
      • slot: the uniform slot
      Returns

      the expression of the whole vec4

    • sample

      String sample(int slot, String uv)

      Returns the expression sampling custom texture slot at uv, or null when the stage cannot sample.

      Parameters
      • slot: the texture slot

      • uv: the coordinate expression

      Returns

      the expression, or null