Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface ShaderEmitter.Inputs
Supplies the backend’s spelling of the inputs a graph reads.
Methods
public abstract 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. |
public abstract 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. |
public abstract String sample(int slot, String uv) | Returns the expression sampling custom texture slot at uv, or null when the stage cannot sample. |
Method details
builtin
public abstract 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
nameString- the built-in’s name, as the
ShaderNodefactories use it
Returns
the expression, or null
uniform
public abstract 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
slotint- the uniform slot
Returns
the expression of the whole vec4
sample
public abstract String sample(int slot, String uv)Returns the expression sampling custom texture
slot at uv, or
null when the stage cannot sample.Parameters
slotint- the texture slot
uvString- the coordinate expression
Returns
the expression, or null