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

◆ DiffuseProcessor() [1/2]

MayaFlux::Buffers::DiffuseProcessor::DiffuseProcessor ( std::string  target_field,
std::string  scratch_field,
const std::string &  shader_path,
uint32_t  iterations = 20 
)

Construct a diffusion stage.

Parameters
target_fieldName of the field diffused. Must be double-buffered.
scratch_fieldName of a field of matching stride holding the pre-diffusion values across passes. Not swapped, may be single-buffered, and its contents are overwritten every cycle.
shader_pathPath to the compute shader.
iterationsJacobi passes per cycle. Values below 1 clamp to 1.

Definition at line 16 of file DiffuseProcessor.cpp.

21 : VolumeFieldProcessor(make_bindings(target_field, scratch_field), shader_path)
22 , m_target_field(std::move(target_field))
23 , m_scratch_field(std::move(scratch_field))
24{
26 set_iteration_count(iterations);
27}
void set_iteration_count(uint32_t count)
Set how many dispatches are recorded per execute cycle.
static std::vector< FieldBinding > make_bindings(const std::string &target_field, const std::string &scratch_field)
Build the binding table for the two field names.
VolumeFieldProcessor(std::vector< FieldBinding > bindings, const std::string &shader_path)
Construct from a shader path.
void add_swap_field(std::string field)
Register a field to swap after each dispatch.

References MayaFlux::Buffers::VolumeFieldProcessor::add_swap_field(), m_target_field, and MayaFlux::Buffers::ComputeProcessor::set_iteration_count().

+ Here is the call graph for this function: