Expand description
repr(C) uniform / root-constant structs only the DirectX frame encoders bind
(cbuffer / root-constant layouts). Each is mirrored field-for-field in an
.hlsl shader under directx/shaders/.
Blocks whose shader counterpart is a single-source .slang declaration are
declared once for every backend in crate::uniforms; what is left here is
what only this backend binds. Their layouts are checked by shader_layout in
concinnity-device, which reads the expected offsets out of slangc’s
reflection per target. The hand-written asserts below are for the families
whose shaders are still per backend – the cull kernel, the skinning and
morph kernels, the raymarch SDF templates, the legacy per-draw main and
velocity passes, and Metal’s water.
Structs§
- Cull
Params - The GPU-cull
CullParamscbuffer (b0, 208 bytes): six already-normalised frustum planes, the camera position sharing its row with the object count, the previous frame’s view-projection, the Hi-Z metadata (dims, mip count, enable flag), then the shader-bucket routing. DirectX fuses the cull + Hi-Z uniforms into one cbuffer. - Raymarch
View - The raymarch pass per-frame
RaymarchViewcbuffer (b0, 160 bytes; aligned to 256 for the D3D12 cbuffer). Mirrors the MetalRaymarchView. - Raymarch
Volume Uniforms - The per-volume
SdfVolumeUniformscbuffer (b1, 176 bytes; aligned to 256 in the cbuffer allocation).