FixedFunctionPass struct
One pass of a fixed-function effect, as described by a shader's fixed_function block.
The fixed-function backends (PVR on the Dreamcast, GX on the Wii/GameCube) have no fragment shaders; every effect is a short list of passes over the same sprite quad, each pass a small bundle of hardware state. This struct is that bundle, with concrete values: the generated effect code (see Docs/FixedFunctionShaderDesign.md) computes the fields at draw time and hands the pass to the backend's EffectContext, which turns it into a polygon header (PVR) or a TEV/blend setup (GX) and submits the quad.
Fields a backend has no hardware for are ignored by it (Gx* on the PVR and the other way round), which is also what makes one shared description usable by both. Everything defaults to a plain modulated sprite pass with the material's own blending.
Public types
-
enum class BlendMode : std::
uint8_t { Material, Additive, Opaque, Alpha } - How the pass blends over what is already in the frame.
-
enum class TevPreset : std::
uint8_t { Modulate, Silhouette, ModulateX2, ModulateX4, TintMix, LumaRamp } - GX texture-environment preset for this pass (the PVR always modulates).
Public variables
- float Color
- Per-vertex colour of the pass (the PVR
argb, the GX raster colour), premultiplied by nothing. - float OffsetColor
- Post-texture additive term (the PVR offset colour; the GX runs a silhouette pass instead).
- bool HasOffsetColor
- Whether OffsetColor is used at all (enables
PVR_SPECULARon the polygon). - float ScreenOffset
- Displacement of the whole quad in the quad's own coordinate space (the Outline ring taps).
- float LumaGain
- How much TevPreset::
LumaRamp amplifies the texel's luminance before saturating it. - BlendMode Blend
- Blend override for this pass.
- TevPreset Tev
- GX combiner preset.
Enum documentation
enum class nCine:: RHI:: FixedFunctionPass:: BlendMode : std:: uint8_t
How the pass blends over what is already in the frame.
| Enumerators | |
|---|---|
| Material |
Whatever the material configured (the default) |
| Additive |
Additive blending for glow and split-multiplier passes. The GX maps it to |
| Opaque |
|
| Alpha |
Standard source-alpha over ( |
enum class nCine:: RHI:: FixedFunctionPass:: TevPreset : std:: uint8_t
GX texture-environment preset for this pass (the PVR always modulates).
| Enumerators | |
|---|---|
| Modulate |
|
| Silhouette |
Vertex colour where the texture has alpha (flat masks, shadows, glows) |
| ModulateX2 |
Modulate with the combiner's x2 output scale |
| ModulateX4 |
Modulate with the combiner's x4 output scale |
| TintMix |
With a shaded strip both terms come from the per-vertex colour, which is how the TexturedBackground warp folds its horizon tint into the band's own draw instead of laying a second gradient pass over it. |
| LumaRamp |
Silhouette whose colour is a per-texel ramp instead of a flat tone: |
Variable documentation
float nCine:: RHI:: FixedFunctionPass:: LumaGain
How much TevPreset::
Only read by that preset (the GLSL it approximates saturates a scaled luma - FrozenMask's min(luma * 2.6, 1.0)). The GX folds it into the KONST-held luminance weights and the combiner's output scale, so any value up to 4 costs nothing extra.