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

◆ emit_binary()

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

Binary state-to-vertex emit: nonzero state draws at full scale, zero state degenerates to a zero-scale (invisible) vertex.

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

Definition at line 45 of file RelaxationSpecs.hpp.

46{
47 return ShaderSpec::Assemble {}
48 .ssbo("cell_state", BindingDirection::Input, Kakshya::GpuDataFormat::UINT32)
49 .ssbo("vertices", BindingDirection::Output, Kakshya::GpuDataFormat::VEC4_F32)
50 .pc("threshold", Kakshya::GpuDataFormat::FLOAT32)
51 .op(KernelOp::CompareGE)
52 .workgroup(256)
53 .build();
54}
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::UINT32, MayaFlux::Kakshya::VEC4_F32, and MayaFlux::Portal::Graphics::ShaderSpec::Assemble::workgroup().

+ Here is the call graph for this function: