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

◆ write_params()

void MayaFlux::Buffers::VolumeSurfaceProcessor::write_params ( )
private

Size the push constant block to at least SurfaceParams and write the lattice dimensions, extraction resolution, and threshold.

Definition at line 66 of file VolumeSurfaceProcessor.cpp.

67{
68 auto& data = get_push_constant_data();
69 if (data.size() < sizeof(SurfaceParams)) {
70 data.resize(sizeof(SurfaceParams));
71 }
72
73 const SurfaceParams params {
74 .width = m_volume->get_width(),
75 .height = m_volume->get_height(),
76 .depth = m_volume->get_depth(),
77 .pad0 = 0,
78 .res_x = m_lattice.resolution.x,
79 .res_y = m_lattice.resolution.y,
80 .res_z = m_lattice.resolution.z,
81 .threshold = m_threshold,
82 };
83
84 std::memcpy(data.data(), &params, sizeof(SurfaceParams));
85}
const std::vector< uint8_t > & get_push_constant_data() const
Get current push constant data.
std::shared_ptr< VolumeGridBuffer > m_volume
The attached volume, cached for the descriptor write.
glm::uvec3 resolution
Cell count per axis. Zero on any axis is invalid.
Definition Lattice.hpp:26

References MayaFlux::Buffers::ShaderProcessor::get_push_constant_data(), m_lattice, m_threshold, m_volume, MayaFlux::Kinesis::Lattice3D::resolution, and MayaFlux::Buffers::VolumeSurfaceProcessor::SurfaceParams::width.

Referenced by on_attach(), and set_threshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: