8 std::shared_ptr<VKBuffer> grid_buf,
9 const glm::vec3& bounds_min,
10 const glm::vec3& bounds_max,
16 , m_grid_buf(
std::move(grid_buf))
17 , m_res_x(
std::max(res_x, 1U))
18 , m_res_y(
std::max(res_y, 1U))
19 , m_res_z(
std::max(res_z, 1U))
26 const glm::vec3 extent = bounds_max - bounds_min;
28 extent.x /
static_cast<float>(
m_res_x),
29 extent.y /
static_cast<float>(
m_res_y),
30 extent.z /
static_cast<float>(
m_res_z),
44 const glm::vec3 extent = bounds_max - bounds_min;
46 extent.x /
static_cast<float>(
m_res_x),
47 extent.y /
static_cast<float>(
m_res_y),
48 extent.z /
static_cast<float>(
m_res_z),
60 const std::shared_ptr<VKBuffer>& )
virtual void on_attach(const std::shared_ptr< Buffer > &)
Called when this processor is attached to a buffer.
void set_dispatch_mode(ShaderDispatchConfig::DispatchMode mode)
Set dispatch mode.
void set_manual_dispatch(uint32_t x, uint32_t y=1, uint32_t z=1)
Set manual dispatch group counts.
Specialized ShaderProcessor for Compute Pipelines.
SDFFieldProcessor(std::shared_ptr< VKBuffer > grid_buf, const glm::vec3 &bounds_min, const glm::vec3 &bounds_max, uint32_t res_x, uint32_t res_y, uint32_t res_z, std::string shader="sdf_field_gyroid.comp")
bool on_before_execute(Portal::Graphics::CommandBufferID cmd_id, const std::shared_ptr< VKBuffer > &buffer) override
Called before each process callback.
void on_attach(const std::shared_ptr< Buffer > &buffer) override
Called when this processor is attached to a buffer.
std::shared_ptr< VKBuffer > m_grid_buf
void set_bounds(const glm::vec3 &bounds_min, const glm::vec3 &bounds_max)
Replace the evaluation volume.
void set_push_constant_data(const T &data)
Update push constant data (type-safe)
void bind_buffer(const std::string &descriptor_name, const std::shared_ptr< VKBuffer > &buffer)
Bind a VKBuffer to a named shader descriptor.
Describes how a VKBuffer binds to a shader descriptor.
std::unordered_map< std::string, ShaderBinding > bindings
size_t push_constant_size
@ MANUAL
Use explicit group counts.