Package limn.render3d.shader
Interface Expr
- All Known Implementing Classes:
Expr.Binary,Expr.Call,Expr.Construct,Expr.Lit,Expr.Raw,Expr.Ref,Expr.Sample,Expr.Swizzle
public sealed interface Expr
permits Expr.Lit, Expr.Ref, Expr.Sample, Expr.Swizzle, Expr.Binary, Expr.Call, Expr.Construct, Expr.Raw
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 ClassesModifier and TypeInterfaceDescriptionstatic final recordBinary arithmetic; result type follows GLSL scalar/vector promotion.static final recordA built-in or engine helper call with a declared result type.static final recordA constructor likevec4(rgb, a)orvec3(x).static final recordA numeric literal, scalar or vector by value count.static enumArithmetic operators.static final recordNon-portable inline GLSL, valid only fortarget.static final recordA named input the framework declares (a UBO member, varying, or sampler).static final recordSamplessampleratuv→ vec4.static final recordComponent selection, e.g. -
Method Summary
-
Method Details
-
type
ShaderType type()
-