Toast Engine
Loading...
Searching...
No Matches
voxel_gpu_storage.hpp File Reference
#include "voxel_change_history.hpp"
#include "vulkan_resource_base.hpp"
#include <array>
#include <cstdint>
#include <glm/glm.hpp>
#include <memory>
#include <optional>
#include <string>
#include <toast/voxel/gpu_layout.hpp>
#include <vector>
Include dependency graph for voxel_gpu_storage.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  renderer::VoxelPackedScene
struct  renderer::VoxelStorageDebugInfo
 Immutable once the storage is published. More...
struct  renderer::VoxelStorageDebugInfo::BrickCensus
class  renderer::VoxelGpuStorage
 Immutable scene version and versions from small carves share buffers patched in place. More...
struct  renderer::VoxelCollisionWorld
struct  renderer::VoxelCollisionWorld::Volume
struct  renderer::VoxelInstanceGpu
 Mirrors voxel_dda.slang VoxelInstance. More...
class  renderer::VoxelSceneUpload

Functions

auto renderer::makeVoxelInstance (const glm::mat4 &model, const glm::mat4 &inverse_model, const glm::mat4 &previous_model, bool has_previous, uint32_t record_index) -> VoxelInstanceGpu
 Voxel (x y z) occupies [x x + 1] in the space the instance maps from.
void renderer::writeVoxelStorageDescriptors (const vk::raii::Device &device, vk::DescriptorSet set, const VoxelGpuStorage &storage)

Variables

constexpr uint32_t renderer::k_voxel_instance_no_motion = 1u << 0
 Bit 0 of VoxelInstanceGpu::flags with the meaning of VulkanRenderer::k_instance_no_motion.
constexpr uint32_t renderer::k_voxel_instance_mirrored = 1u << 1
 Bit 1 of VoxelInstanceGpu::flags so voxel.slang flips the box winding.

Detailed Description

Author
dario
Date
13/09/2026

Function Documentation

◆ writeVoxelStorageDescriptors()

void renderer::writeVoxelStorageDescriptors ( const vk::raii::Device & device,
vk::DescriptorSet set,
const VoxelGpuStorage & storage )

Bindings 0 to 5 of set 1 in voxel_dda.slang order

Note
The set must not be in use by a frame still in flight