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

◆ auto_steps()

uint32_t MayaFlux::Buffers::RaymarchProcessor::auto_steps ( ) const
private

Steps needed to cross the lattice diagonal at the current step scale, capped at 512.

Definition at line 62 of file RaymarchProcessor.cpp.

63{
64 constexpr uint32_t k_cap = 512;
65
66 const glm::vec3 cell = m_lattice.cell_size();
67 const float step = std::min({ cell.x, cell.y, cell.z }) * std::max(m_params.step_scale, 1e-3F);
68 const float span = glm::length(m_lattice.bounds.max - m_lattice.bounds.min);
69
70 return std::min(k_cap, static_cast<uint32_t>(std::ceil(span / step)) + 1U);
71}
glm::vec3 cell_size() const noexcept
Edge length of one cell along each axis.
Definition Lattice.hpp:30
AABB3D bounds
Continuous extent subdivided.
Definition Lattice.hpp:27

References MayaFlux::Kinesis::Lattice3D::bounds, MayaFlux::Kinesis::Lattice3D::cell_size(), m_lattice, m_params, MayaFlux::Kinesis::AABB3D::max, MayaFlux::Kinesis::AABB3D::min, and MayaFlux::Buffers::RaymarchProcessor::MarchParams::step_scale.

Referenced by configure(), and set_step_scale().

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