MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ GpuFieldOperator()

MayaFlux::Nodes::Network::GpuFieldOperator::GpuFieldOperator ( Kakshya::VertexLayout  layout,
SpatialFieldConfig  config = {} 
)
explicit
Parameters
layoutVertex layout describing the record the shader will write. stride_bytes and every bound attribute's offset_in_vertex must be divisible by 4; construction fails loudly otherwise.
configSpatial-field configuration read by NetworkGeometryBuffer's wiring: which of the spatial-hash / claim / density / population stages to build, plus their live-tunable values. Defaulted empty, meaning field displacement only.

Definition at line 122 of file GpuFieldOperator.cpp.

123 : m_layout(std::move(layout))
124 , m_field_config(config)
125{
126 if (m_layout.stride_bytes == 0 || m_layout.stride_bytes % 4 != 0) {
128 "GpuFieldOperator: stride {} is not a nonzero multiple of 4. The "
129 "emitted shader addresses the record as a flat float array and "
130 "cannot describe this layout. The operator is inert: bind() will "
131 "reject everything and build_spec() returns nullopt.",
133 return;
134 }
135
137}
#define MF_ERROR(comp, ctx,...)
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
uint32_t stride_bytes
Total bytes per vertex (stride in Vulkan terms) e.g., 3 floats (position) + 3 floats (normal) = 24 by...

References m_layout, m_stride_words, MF_ERROR, MayaFlux::Journal::NodeProcessing, MayaFlux::Journal::Nodes, and MayaFlux::Kakshya::VertexLayout::stride_bytes.