11class SDFPrepProcessor;
12class SDFFieldProcessor;
13class SDFMeshProcessor;
56 std::filesystem::path,
63 glm::vec3 bounds_min { -1.0F };
64 glm::vec3 bounds_max { 1.0F };
65 uint32_t resolution_x { 32 };
66 uint32_t resolution_y { 32 };
67 uint32_t resolution_z { 32 };
68 float iso_level { 0.0F };
76 return m_field_processor;
89 return m_sdf_processor;
100 [[nodiscard]] std::optional<uint32_t> get_live_vertex_count()
const;
122 void set_bounds(
const glm::vec3& bounds_min,
const glm::vec3& bounds_max);
129 void set_resolution(uint32_t res_x, uint32_t res_y, uint32_t res_z);
132 void set_iso_level(
float iso_level);
150 std::shared_ptr<Core::VKImage>
image,
151 std::string binding =
"diffuseTex");
157 [[nodiscard]] std::shared_ptr<Core::VKImage>
get_diffuse_texture() const noexcept {
return m_diffuse_texture; }
167 std::string m_diffuse_binding {
"diffuseTex" };
183 uint32_t res_x, uint32_t res_y, uint32_t res_z)
noexcept
~ComputeMeshBuffer() override=default
std::shared_ptr< SDFFieldProcessor > get_field_processor() const
Access the field processor to drive time or bounds from a metro.
std::shared_ptr< SDFMeshProcessor > m_sdf_processor
std::shared_ptr< SDFFieldProcessor > m_field_processor
Kinesis::SpatialField m_field
std::shared_ptr< SDFMeshProcessor > get_mesh_processor() const
The marching-cubes stage, valid after setup_processors().
static size_t worst_case_bytes(uint32_t res_x, uint32_t res_y, uint32_t res_z) noexcept
std::shared_ptr< Core::VKImage > get_diffuse_texture() const noexcept
Diffuse texture is optional, so may return nullptr.
std::variant< Kinesis::SpatialField, std::filesystem::path, Kinesis::DualSpatialField, Kinesis::TemporalSpatialField, Kinesis::ParametricSpatialField > FieldSource
std::shared_ptr< Core::VKImage > m_diffuse_texture
std::shared_ptr< SDFPrepProcessor > m_prep_processor
std::string m_field_shader
bool has_diffuse_texture() const noexcept
Check if a diffuse texture is bound.
std::optional< Kinesis::FieldSource > m_field_expression
VKBuffer that evaluates a SpatialField isosurface via marching cubes on the GPU and renders directly ...
Vulkan-backed buffer wrapper used in processing chains.
ProcessingToken
Bitfield enum defining processing characteristics and backend requirements for buffer operations.
Vertex type for indexed triangle mesh primitives (TRIANGLE_LIST topology)
One authored expression carried as both a host callable and shader text.
An authored expression of position, time and a parameter block, shader-only.
An authored expression of position and time, shader-only.
Typed, composable, stateless callable from domain D to range R.
Unified rendering configuration for graphics buffers.