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

◆ influx()

std::shared_ptr< InfluxProcessor > MayaFlux::Buffers::VolumeGridBuffer::influx ( const std::string &  field,
const InfluxProcessor::Spot &  spot,
const std::string &  shader = "volume_influx_blob.comp.spv" 
)

Add an influx stage to this volume's chain and return it.

Parameters
fieldName of the double buffered field added into.
spotPlacement and strength.
shaderShader defining shape(). The default is a soft round blob.
Returns
The stage, already in the chain, or nullptr if the volume is not registered yet. Retune it with its own setters.

Call after registration. A stage added before setup_flow runs ahead of the flow stages, which is where an influx belongs. One added after runs behind them, so what it adds is not transported until the next cycle.

Definition at line 299 of file VolumeGridBuffer.cpp.

303{
305 if (!chain) {
307 "influx: no processing chain, call after registration");
308 return nullptr;
309 }
310
311 auto stage = std::make_shared<InfluxProcessor>(field, shader, spot);
312 chain->add_processor(stage, std::dynamic_pointer_cast<VolumeGridBuffer>(shared_from_this()));
313 return stage;
314}
#define MF_ERROR(comp, ctx,...)
BufferProcessingChain * chain
std::shared_ptr< Buffers::BufferProcessingChain > get_processing_chain() override
Access the buffer's processing chain.
Definition VKBuffer.cpp:271
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::Buffers, chain, MayaFlux::Buffers::VKBuffer::get_processing_chain(), MayaFlux::Journal::Init, and MF_ERROR.

+ Here is the call graph for this function: