Package limn.render3d.shader


package limn.render3d.shader
A neutral, typed shader IR: a material's surface is a SurfaceOutputs built from Expr nodes, and a backend's code generator walks that DAG to emit its own shading language, so the toolkit ships no GLSL, and a new target means a new generator rather than new materials. StandardSurface expresses the built-in metallic-roughness surface in this IR, and is the model for writing a custom one.
  • Class
    Description
    A node in the neutral, typed shader-expression DAG.
    Binary arithmetic; result type follows GLSL scalar/vector promotion.
    A built-in or engine helper call with a declared result type.
    A constructor like vec4(rgb, a) or vec3(x).
    A numeric literal, scalar or vector by value count.
    Arithmetic operators.
    Non-portable inline GLSL, valid only for target.
    A named input the framework declares (a UBO member, varying, or sampler).
    Samples sampler at uv → vec4.
    Component selection, e.g.
    The value types the neutral shader IR works with: the GLSL scalar/vector types plus sampler2D.
    Builds the SurfaceOutputs for the built-in metallic-roughness material, the same surface the hand-written reference shader computes, expressed as neutral IR so one code generator can target multiple shading languages.
    What a material's surface function contributes to the engine's lighting core: the metallic-roughness inputs.
    A shading-language target the IR can be compiled to.