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

◆ SDFMeshProcessor() [1/2]

MayaFlux::Buffers::SDFMeshProcessor::SDFMeshProcessor ( Kinesis::SpatialField  field,
const glm::vec3 &  bounds_min,
const glm::vec3 &  bounds_max,
uint32_t  res_x,
uint32_t  res_y,
uint32_t  res_z,
float  iso_level 
)
Parameters
fieldSpatialField evaluated on CPU each dirty frame.
bounds_minWorld-space minimum corner.
bounds_maxWorld-space maximum corner.
res_xCell count along X (minimum 1).
res_yCell count along Y (minimum 1).
res_zCell count along Z (minimum 1).
iso_levelIsosurface threshold.

Definition at line 20 of file SDFMeshProcessor.cpp.

28 : ComputeProcessor("mc_emit.comp.spv", 64)
29 , m_field(std::move(field))
30 , m_bounds_min(bounds_min)
31 , m_bounds_max(bounds_max)
32 , m_res_x(std::max(res_x, 1U))
33 , m_res_y(std::max(res_y, 1U))
34 , m_res_z(std::max(res_z, 1U))
35 , m_iso_level(iso_level)
36{
37 m_config.push_constant_size = sizeof(McPC);
38
39 m_config.bindings["sdf_grid"] = ShaderBinding(0, 0, vk::DescriptorType::eStorageBuffer);
40 m_config.bindings["edge_table"] = ShaderBinding(0, 1, vk::DescriptorType::eStorageBuffer);
41 m_config.bindings["tri_table"] = ShaderBinding(0, 2, vk::DescriptorType::eStorageBuffer);
42 m_config.bindings["vertices"] = ShaderBinding(0, 3, vk::DescriptorType::eStorageBuffer);
43 m_config.bindings["counter"] = ShaderBinding(0, 4, vk::DescriptorType::eStorageBuffer);
44
46}
ComputeProcessor(const std::string &shader_path, uint32_t workgroup_x=256)
Construct processor with shader path.
void set_dispatch_mode(ShaderDispatchConfig::DispatchMode mode)
Set dispatch mode.
std::unordered_map< std::string, ShaderBinding > bindings

References MayaFlux::Buffers::ShaderConfig::bindings, MayaFlux::Buffers::ShaderProcessor::m_config, MayaFlux::Buffers::ShaderDispatchConfig::MANUAL, MayaFlux::Buffers::ShaderConfig::push_constant_size, and MayaFlux::Buffers::ComputeProcessor::set_dispatch_mode().

+ Here is the call graph for this function: