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

◆ bind() [6/9]

void MayaFlux::Nodes::Network::GpuFieldOperator::bind ( FieldTarget  target,
const Kinesis::ParametricVectorField &  field,
std::optional< uint32_t >  cluster = std::nullopt 
)

Bind a three-component field of position, time and live parameters.

Parameters
targetMask over POSITION, COLOR, NORMAL and TANGENT.
fieldParametric field with a usable shader half.
clusterSee the DualVectorField overload's own doc.

Validation matches the DualField overload. The emitted function takes the time push constant and the vec4 set with set_params(), so changing the parameters never rebuilds the spec.

Definition at line 400 of file GpuFieldOperator.cpp.

402{
403 if (any_flag(target & ~Kinesis::k_vector_targets)) {
405 "GpuFieldOperator::bind: mask {:#x} reaches bits {:#x} that a "
406 "three-component field cannot drive. Nothing was bound.",
407 static_cast<uint16_t>(target),
408 static_cast<uint16_t>(target & ~Kinesis::k_vector_targets));
409 return;
410 }
411
412 if (!accept(target, field.source, 3))
413 return;
414
415 store(target, field.source, 3, true, cluster, true);
416}
#define MF_ERROR(comp, ctx,...)
bool accept(FieldTarget target, const Kinesis::FieldSource &source, uint32_t components)
Shared validation for the three bind overloads.
void store(FieldTarget, const Kinesis::FieldSource &, uint32_t, bool, std::optional< uint32_t > cluster, bool parametric=false)
Store a binding after validation.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
constexpr FieldTarget k_vector_targets
Targets that accept a three-component field.

References accept(), MayaFlux::Kinesis::k_vector_targets, MF_ERROR, MayaFlux::Journal::NodeProcessing, MayaFlux::Journal::Nodes, MayaFlux::Kinesis::ParametricField< D, R >::source, and store().

+ Here is the call graph for this function: