45 std::shared_ptr<VKBuffer> grid_buf,
46 const glm::vec3& bounds_min,
47 const glm::vec3& bounds_max,
51 std::string shader =
"sdf_field_gyroid.comp");
56 void set_bounds(
const glm::vec3& bounds_min,
const glm::vec3& bounds_max);
60 [[nodiscard]]
float get_time()
const {
return m_pc.time; }
63 void set_param0(
float v) { m_pc._pad[0] = std::bit_cast<uint32_t>(v); }
64 void set_param1(
float v) { m_pc._pad[1] = std::bit_cast<uint32_t>(v); }
67 void on_attach(
const std::shared_ptr<Buffer>& buffer)
override;
68 bool on_before_execute(
70 const std::shared_ptr<VKBuffer>& buffer)
override;
82 static_assert(
sizeof(PC) % 16 == 0);