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

◆ bind() [6/6]

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 346 of file GpuFieldOperator.cpp.

348{
349 if (any_flag(target & ~Kinesis::k_vector_targets)) {
351 "GpuFieldOperator::bind: mask {:#x} reaches bits {:#x} that a "
352 "three-component field cannot drive. Nothing was bound.",
353 static_cast<uint16_t>(target),
354 static_cast<uint16_t>(target & ~Kinesis::k_vector_targets));
355 return;
356 }
357
358 if (!accept(target, field.source, 3))
359 return;
360
361 store(target, field.source, 3, true, cluster);
362}
#define MF_ERROR(comp, ctx,...)
void store(FieldTarget, const Kinesis::FieldSource &, uint32_t, bool, std::optional< uint32_t > cluster)
Store a binding after validation.
bool accept(FieldTarget target, const Kinesis::FieldSource &source, uint32_t components)
Shared validation for the three bind overloads.
@ 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: