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

◆ bind() [9/9]

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

Bind a three-component field of position and time.

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

Validation matches the DualField overload. The emitted function takes a second float argument supplied from the time push constant.

Definition at line 348 of file GpuFieldOperator.cpp.

350{
351 if (any_flag(target & ~Kinesis::k_vector_targets)) {
353 "GpuFieldOperator::bind: mask {:#x} reaches bits {:#x} that a "
354 "three-component field cannot drive. Nothing was bound.",
355 static_cast<uint16_t>(target),
356 static_cast<uint16_t>(target & ~Kinesis::k_vector_targets));
357 return;
358 }
359
360 if (!accept(target, field.source, 3))
361 return;
362
363 store(target, field.source, 3, true, cluster);
364}
#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::TemporalField< D, R >::source, and store().

+ Here is the call graph for this function: