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

◆ emit_scalar_ramp()

Portal::Graphics::ShaderSpec MayaFlux::Buffers::RelaxationSpecs::emit_scalar_ramp ( )
inline

Scalar-ramp state-to-vertex emit: float state value scaled and offset into a visible output range.

Input state format: FLOAT32. Output: VEC4_F32 per vertex.

Definition at line 62 of file RelaxationSpecs.hpp.

63{
64 return ShaderSpec::Assemble {}
65 .ssbo("cell_state", BindingDirection::Input, Kakshya::GpuDataFormat::FLOAT32)
66 .ssbo("vertices", BindingDirection::Output, Kakshya::GpuDataFormat::VEC4_F32)
67 .pc("scale", Kakshya::GpuDataFormat::FLOAT32)
68 .pc("offset", Kakshya::GpuDataFormat::FLOAT32)
69 .op(KernelOp::ScaleOffset)
70 .workgroup(256)
71 .build();
72}
Assemble & op(KernelOp o)
Set the named operation the emitter will lower to SPIR-V.
ShaderSpec build()
Finalise and return the ShaderSpec.
Assemble & pc(std::string name, Kakshya::GpuDataFormat format)
Declare a push constant field with explicit format.
Assemble & ssbo(std::string name, BindingDirection direction, Kakshya::GpuDataFormat format, Kakshya::DataModality modality=Kakshya::DataModality::SCALAR_F32)
Declare an SSBO binding.
Assemble & workgroup(uint32_t x, uint32_t y=1, uint32_t z=1)
Override workgroup size.
Fluent assembler producing a ShaderSpec.

References MayaFlux::Portal::Graphics::ShaderSpec::Assemble::build(), MayaFlux::Kakshya::FLOAT32, MayaFlux::Portal::Graphics::ShaderSpec::Assemble::op(), MayaFlux::Portal::Graphics::ShaderSpec::Assemble::pc(), MayaFlux::Portal::Graphics::ShaderSpec::Assemble::ssbo(), MayaFlux::Kakshya::VEC4_F32, and MayaFlux::Portal::Graphics::ShaderSpec::Assemble::workgroup().

+ Here is the call graph for this function: