Interface Expr

All Known Implementing Classes:
Expr.Binary, Expr.Call, Expr.Construct, Expr.Lit, Expr.Raw, Expr.Ref, Expr.Sample, Expr.Swizzle

A node in the neutral, typed shader-expression DAG. A material contributes a SurfaceOutputs built from these; a backend code generator walks the DAG to emit target GLSL (or, later, SPIR-V/MSL). Every node exposes its ShaderType so the generator can type-check and construct correctly.

The set is deliberately small (enough for the standard metallic-roughness surface and simple custom surfaces), with Expr.Raw as a per-target escape.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Binary arithmetic; result type follows GLSL scalar/vector promotion.
    static final record 
    A built-in or engine helper call with a declared result type.
    static final record 
    A constructor like vec4(rgb, a) or vec3(x).
    static final record 
    A numeric literal, scalar or vector by value count.
    static enum 
    Arithmetic operators.
    static final record 
    Non-portable inline GLSL, valid only for target.
    static final record 
    A named input the framework declares (a UBO member, varying, or sampler).
    static final record 
    Samples sampler at uv → vec4.
    static final record 
    Component selection, e.g.
  • Method Summary

    Modifier and Type
    Method
    Description