Skip to content

ludus::graphics::renderer::RenderGraphPrograms

Ludus Wiki · API overview · Browse API

Struct

Cooked static raster stage pairs and linked triangle ray compute/image stages. No compiler or shader-source discovery. Ray plans also carry ColorVertex/ColorFragment for shared static mesh ownership; that pair never rasterizes the ray scene. Artifact/reflection storage remains immutable and alive until Initialize/Poll reaches Ready; generated package headers provide static storage. Each selected vertex uses the six Renderer flat locations. Raster stage bindings, when present, are read-only uniform buffers that exactly match the plan's uniform binding records. Ray compute can additionally bind the plan's StorageBuffers at user slots 6/7. A depth-only stage pair shares its family's exact geometry stage; the masked depth fragment is a separately authored coverage function.

Note

The struct is tens of KiB. Browser hosts run on emscripten's default 64 KiB stack, so construct it in owned storage, for example new (std::nothrow) RenderGraphPrograms(MakePrograms(...)), rather than as a stack temporary.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

#include <ludus/graphics/renderer/render_graph.hpp>
struct ludus::graphics::renderer::RenderGraphPrograms final

Fields

CaptureWarmupSamples

foundation::StaticArray<foundation::uint32, content::render_graph_format::MAX_RAY_PROGRAMS> ludus::graphics::renderer::RenderGraphPrograms::CaptureWarmupSamples {}
Discarded startup invocations before a frame capture collects its requested count; zero for IID graphs. Indexed by Pass::RayProgram and cooked from each compute program's UInt32 capture_warmup_setting. Interactive limits are unchanged.

Related types: content::render_graph_format::MAX_RAY_PROGRAMS · foundation::StaticArray · foundation::uint32

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

ColorVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::ColorVertex {}
Authored ColorAndDepth geometry entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

ColorFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::ColorFragment {}
Authored color entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DepthVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DepthVertex {}
Authored DepthOnly geometry entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DepthFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DepthFragment {}
Authored void depth entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

CompositeVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::CompositeVertex {}
Installed renderer_composite recipe vertex.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

CompositeFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::CompositeFragment {}
Installed renderer_composite recipe fragment.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

MaskedColorVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::MaskedColorVertex {}
Authored MaskedColorAndDepth geometry entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

MaskedColorFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::MaskedColorFragment {}
Authored masked color entry with its coverage function.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

MaskedDepthVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::MaskedDepthVertex {}
Authored MaskedDepthOnly geometry entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

MaskedDepthFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::MaskedDepthFragment {}
Separately authored void masked coverage entry.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

NativeRayStages

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::NativeRayStages {}
Native Metal ray stages; borrowed through graph preparation like RayCompute. Empty when unused.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

RayCompute

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::RayCompute {}
Linked authored triangle ray functions and BVH traversal.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

RayImageVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::RayImageVertex {}
Renderer-owned GPU-produced pixel presentation.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

RayImageFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::RayImageFragment {}
Renderer-owned color copy; no host pixel transfer.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

AdditionalRasterStages

foundation::StaticArray<rhi::RasterShaderDescription, content::render_graph_format::ADDITIONAL_RASTER_TECHNIQUE_COUNT * content::render_graph_format::TECHNIQUE_STAGE_COUNT> ludus::graphics::renderer::RenderGraphPrograms::AdditionalRasterStages {}
Independent raster stage pairs in numeric technique order after the legacy roles. Index (Program - LEGACY_TECHNIQUE_COUNT) * TECHNIQUE_STAGE_COUNT selects a vertex description; the following entry is its fragment description. All artifact/input/binding storage is borrowed through initialization/preparation, with the same lifetime contract as ColorVertex and ColorFragment.

Related types: content::render_graph_format::TECHNIQUE_STAGE_COUNT · content::render_graph_format::ADDITIONAL_RASTER_TECHNIQUE_COUNT · foundation::StaticArray · rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

ForwardVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::ForwardVertex {}
Authored material geometry, supplied together with all forward stages.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

ForwardFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::ForwardFragment {}
Authored material ABI; HasClusteredForward selects its complete light-list layout.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

ForwardShadow

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::ForwardShadow {}
Matching material shadow ABI used by program qualification.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

LightingVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::LightingVertex {}
Renderer output preparation support.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

LightingFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::LightingFragment {}
Renderer output preparation support.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

ForwardDepth

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::ForwardDepth {}
Void opaque prepass fragment, required with HasClusteredForward; uses ForwardVertex unchanged.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

LightingShadow

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::LightingShadow {}
Flat caster support for lighting initialization.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasVisibilityBuffer

bool ludus::graphics::renderer::RenderGraphPrograms::HasVisibilityBuffer = false
Linked ray kernel reads the paired raster visibility/depth inputs declared by the plan.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasClusteredForward

bool ludus::graphics::renderer::RenderGraphPrograms::HasClusteredForward = false
Use the complete clustered material ABI and conservative spatial light lists.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DeferredGBufferFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DeferredGBufferFragment {}
Opaque material fragment writing normal/roughness, base/metallic and emission/coverage in RGBA16F. It applies alpha-masked coverage and draws masked materials when DeferredOpaqueGBufferFragment is present, every material otherwise.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DeferredOpaqueGBufferFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DeferredOpaqueGBufferFragment {}
The same G-buffer fragment compiled without the coverage test, drawn for opaque materials before masked ones so tile-based GPUs keep hidden-surface removal. Present with HasClusteredDeferred in packages from format::OPAQUE_GBUFFER_PACKAGE_VERSION; empty in earlier packages, which draw every material through DeferredGBufferFragment.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DeferredLightingVertex

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DeferredLightingVertex {}
Renderer fullscreen geometry for deferred lighting and optional prepass depth transfer.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DeferredLightingFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DeferredLightingFragment {}
Clustered lighting resolve; reads the G-buffer and writes linear color plus scene depth.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

DeferredDepthCopyFragment

rhi::RasterShaderDescription ludus::graphics::renderer::RenderGraphPrograms::DeferredDepthCopyFragment {}
Optional prepass depth transfer into the G-buffer's private depth owner.

Related types: rhi::RasterShaderDescription

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasClusteredDeferred

bool ludus::graphics::renderer::RenderGraphPrograms::HasClusteredDeferred = false
Enable the opaque three-target deferred profile; requires the complete clustered material ABI.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasPersistentRayBuffers

bool ludus::graphics::renderer::RenderGraphPrograms::HasPersistentRayBuffers = false
Extended ordered ray ABI with two persistent uint4 storage slots.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasSceneShaderInterface

bool ludus::graphics::renderer::RenderGraphPrograms::HasSceneShaderInterface = false
Opt-in material/light/query callback ABI, encoded in cooked stage roles.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasRayPathCapture

bool ludus::graphics::renderer::RenderGraphPrograms::HasRayPathCapture = false
RayCompute is the diagnostic ray path capture variant (LUDUS_RAY_PATH_CAPTURE) of the same source snapshot: it also binds one read-write capture buffer at slot 10. RenderGraph appends that binding when RayCompute.Bindings omit it. Such a graph requires RequestRayPathCapture before its first Update and accepts exactly one extraction. Runtime packages never carry this variant.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasLtcTable

bool ludus::graphics::renderer::RenderGraphPrograms::HasLtcTable = false
RayCompute reads the renderer-owned LTC table (scene_interface.polygonal_light_sampling) and ends its bindings with the read-only table buffer at slot 13 (LUDUS_GRAPH_LTC_TABLE_BINDING). The renderer uploads and binds that buffer; RayCompute.Bindings must name the slot exactly when this is true. See docs/development/ltc-table.md.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasRayTiles

bool ludus::graphics::renderer::RenderGraphPrograms::HasRayTiles = false
RayCompute offsets its dispatch by the ray uniform's tile region (runtime package version 28 and later, and every generated header), so RenderGraph::SetRayTileCount may split a sample into row bands. Older kernels cover the whole image on every dispatch and therefore cannot be tiled.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp

HasLightTransformer

bool ludus::graphics::renderer::RenderGraphPrograms::HasLightTransformer =
false
Requires a trained model description; prepares a view-independent GPU encoder.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/render_graph.hpp