Starting torroidal structure table

This commit is contained in:
2026-11-05 23:07:00 +01:00
parent 599a40301e
commit 514bf5ba02
14 changed files with 667 additions and 108 deletions
+6 -5
View File
@@ -1,6 +1,7 @@
// import ray_cast;
import voxel_cache;
import fixed_structure_table;
import toroidal_structure_table;
import voxel_tracing;
import lod_policies;
@@ -38,7 +39,7 @@ public struct VertexOutput
uniform PushConstants constants;
ParameterBlock<VoxelCacheParameters<2>> cache_parameters;
ParameterBlock<FixedStructureTable> table_parameters;
ParameterBlock<ToroidalStructureTable> table_parameters;
public struct ColorHit<let N : uint32_t> : IVoxelHit<N>
{
@@ -134,7 +135,7 @@ void ray_march_compute(uint32_t3 location: SV_DispatchThreadID, uint32_t3 local_
cache_tracer.frame_timestamp = constants.frame_timestamp;
cache_tracer.voxel_hit = ColorHit<2>();
FixedStructureTableChunks table_tracer;
ToroidalStructureTableTracer table_tracer;
table_tracer.structure_table = table_parameters;
table_tracer.extent = uint32_t3(constants.chunk_width, constants.chunk_alt, constants.chunk_width);
@@ -147,7 +148,7 @@ void ray_march_compute(uint32_t3 location: SV_DispatchThreadID, uint32_t3 local_
PixelFootprintLod lod = PixelFootprintLod.create((100.f * 3.14f) / 180.f, 1080.f, 2.f);
Tracer<FixedStructureTableChunks, VoxelCacheTracer<2, ColorHit<2>>, PixelFootprintLod> tracer;
Tracer<ToroidalStructureTableTracer, VoxelCacheTracer<2, ColorHit<2>>, PixelFootprintLod> tracer;
tracer.structure = table_tracer;
tracer.cache = cache_tracer;
tracer.lod = lod;
@@ -156,8 +157,8 @@ void ray_march_compute(uint32_t3 location: SV_DispatchThreadID, uint32_t3 local_
Span s;
bool hit = tracer.trace(stacks[stack_index], h, r, s);
FixedStructureTableChunks.Cursor cursor = table_tracer.begin(r, s);
Cell cell;
ToroidalStructureTableTracer.Cursor cursor = table_tracer.begin(r, s);
Cell cell;
if (hit)
{