8#include "vulkan_renderer.hpp"
19namespace renderer::voxel_debug {
32constexpr auto isView(uint32_t render_mode)
noexcept ->
bool {
33 return render_mode >=
static_cast<uint32_t
>(View::steps) && render_mode <=
static_cast<uint32_t
>(View::palette_id);
44 Rgb {0.10f, 0.15f, 0.55f},
45 Rgb {0.10f, 0.45f, 0.90f},
46 Rgb {0.10f, 0.75f, 0.75f},
47 Rgb {0.25f, 0.80f, 0.25f},
48 Rgb {0.90f, 0.85f, 0.15f},
49 Rgb {0.95f, 0.50f, 0.10f},
50 Rgb {0.90f, 0.15f, 0.10f},
51 Rgb {0.85f, 0.20f, 0.85f},
53inline constexpr std::array<uint32_t, 8> k_step_band_starts {1, 4, 8, 16, 32, 64, 128, 256};
54inline constexpr Rgb k_exhausted_color {1.0f, 1.0f, 1.0f};
55inline constexpr Rgb k_uniform_brick_color {0.20f, 0.40f, 0.95f};
56inline constexpr Rgb k_shared_brick_color {0.25f, 0.75f, 0.30f};
57inline constexpr Rgb k_owned_brick_color {0.95f, 0.55f, 0.12f};
58inline constexpr Rgb k_default_material_color {0.90f, 0.10f, 0.90f};
65 glm::vec3 world_position {0.0f};
66 float distance = 0.0f;
71 uint32_t brick_entry = 0;
73 float max_emissive = 1.0f;
83 std::optional<Probe> hit;
84 std::optional<MissProbe> miss;
104 uint64_t m_sequence = 0;
105 uint32_t m_frames_since_upload = 0;
106 std::deque<std::chrono::steady_clock::time_point> m_uploads;
108 std::optional<ProbeResult> m_probe;
Render thread only.
Definition voxel_debug.hpp:93
void drawPanel(const VulkanRenderer::RenderFrame &frame) const
Call inside the Toast Debug window.
Definition voxel_debug.cpp:512
void drawOverlay(const VulkanRenderer::RenderFrame &frame) const
Draws nothing outside a voxel view.
Definition voxel_debug.cpp:446
Definition vulkan_renderer.hpp:377
Definition vulkan_renderer.hpp:286
The costliest box the cursor ray entered without hitting anything.
Definition voxel_debug.hpp:77
Definition voxel_debug.hpp:82
From voxel::marchRay over the uploaded data.
Definition voxel_debug.hpp:61
glm::ivec3 face
Volume space and zero when the ray started inside a solid voxel.
Definition voxel_debug.hpp:69
Definition voxel_debug.hpp:36
16 bytes and the offsets are a shader contract
Definition palette.hpp:26
Definition ray_march.hpp:21
View
Mirrors lighting.slang kRenderModeVoxel and the editor RenderMode enum.
Definition voxel_debug.hpp:22
constexpr std::array< Rgb, 8 > k_step_band_colors
Mirrors voxel.slang kStepBandColors.
Definition voxel_debug.hpp:43