Toast Engine
Loading...
Searching...
No Matches
voxel_debug.hpp File Reference
#include "vulkan_renderer.hpp"
#include <array>
#include <chrono>
#include <cstdint>
#include <deque>
#include <optional>
#include <string_view>
#include <toast/voxel/palette.hpp>
#include <toast/voxel/ray_march.hpp>
Include dependency graph for voxel_debug.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  renderer::voxel_debug::Rgb
struct  renderer::voxel_debug::Probe
 From voxel::marchRay over the uploaded data. More...
struct  renderer::voxel_debug::MissProbe
 The costliest box the cursor ray entered without hitting anything. More...
struct  renderer::voxel_debug::ProbeResult
class  renderer::voxel_debug::Monitor
 Render thread only. More...

Enumerations

enum class  renderer::voxel_debug::View : uint8_t {
  steps = 20 , traversal = 21 , bricks = 22 , volumes = 23 ,
  materials = 24 , palette_id = 25
}
 Mirrors lighting.slang kRenderModeVoxel and the editor RenderMode enum.

Functions

constexpr auto renderer::voxel_debug::isView (uint32_t render_mode) noexcept -> bool
auto renderer::voxel_debug::probe (const VulkanRenderer::RenderFrame &frame, glm::vec2 cursor) -> std::optional< ProbeResult >

Variables

constexpr std::array< Rgb, 8 > renderer::voxel_debug::k_step_band_colors
 Mirrors voxel.slang kStepBandColors.
constexpr std::array< uint32_t, 8 > renderer::voxel_debug::k_step_band_starts {1, 4, 8, 16, 32, 64, 128, 256}
constexpr Rgb renderer::voxel_debug::k_exhausted_color {1.0f, 1.0f, 1.0f}
constexpr Rgb renderer::voxel_debug::k_uniform_brick_color {0.20f, 0.40f, 0.95f}
constexpr Rgb renderer::voxel_debug::k_shared_brick_color {0.25f, 0.75f, 0.30f}
constexpr Rgb renderer::voxel_debug::k_owned_brick_color {0.95f, 0.55f, 0.12f}
constexpr Rgb renderer::voxel_debug::k_default_material_color {0.90f, 0.10f, 0.90f}

Detailed Description

Author
dario
Date
19/09/2026

Function Documentation

◆ probe()

auto renderer::voxel_debug::probe ( const VulkanRenderer::RenderFrame & frame,
glm::vec2 cursor ) -> std::optional< ProbeResult >
nodiscard
Returns
nothing without the CPU mirror
Note
Voxels only so a mesh in front of the cursor is ignored

Variable Documentation

◆ k_step_band_colors

std::array<Rgb, 8> renderer::voxel_debug::k_step_band_colors
inlineconstexpr
Initial value:
{
Rgb {0.10f, 0.15f, 0.55f},
Rgb {0.10f, 0.45f, 0.90f},
Rgb {0.10f, 0.75f, 0.75f},
Rgb {0.25f, 0.80f, 0.25f},
Rgb {0.90f, 0.85f, 0.15f},
Rgb {0.95f, 0.50f, 0.10f},
Rgb {0.90f, 0.15f, 0.10f},
Rgb {0.85f, 0.20f, 0.85f},
}
Definition voxel_debug.hpp:36

Mirrors voxel.slang kStepBandColors.