Fixing LOD policy
This commit is contained in:
Binary file not shown.
+1
-1
@@ -145,7 +145,7 @@ void ray_march_compute(uint32_t3 location: SV_DispatchThreadID, uint32_t3 local_
|
||||
r.direction = ray_direction;
|
||||
r.invDirection = 1.f / ray_direction;
|
||||
|
||||
PixelFootprintLod lod = PixelFootprintLod.create((100.f * 3.14f) / 180.f, 1080.f, 200.f);
|
||||
PixelFootprintLod lod = PixelFootprintLod.create((100.f * 3.14f) / 180.f, 1080.f, 2.f);
|
||||
|
||||
Tracer<FixedStructureTableChunks, VoxelCacheTracer<2, ColorHit<2>>, PixelFootprintLod> tracer;
|
||||
tracer.structure = table_tracer;
|
||||
|
||||
@@ -121,7 +121,7 @@ float3 floor_scale(float3 position, uint32_t scale_exp)
|
||||
float node_size(uint32_t scale_exp)
|
||||
{
|
||||
let mantissa_mask = ~(~0u << 23);
|
||||
return ((1 << scale_exp) & mantissa_mask | (127 << 23)) - 1.f;
|
||||
return asfloat(((1 << scale_exp) & mantissa_mask | (127 << 23))) - 1.f;
|
||||
}
|
||||
|
||||
ByteColor fetch_color<let N : int>(VoxelCacheParameters<N> p, uint32_t index, uint32_t child_index)
|
||||
@@ -197,7 +197,7 @@ public struct VoxelCacheTracer<let N : int, H : IVoxelHit<N>> : IVoxelCache
|
||||
}
|
||||
|
||||
// Request subdiv
|
||||
if (this.report_requests && !lod.shouldStop(t + offset_t, scale_exp) && current_node.subdivided() && !current_node.pointer_valid())
|
||||
if (this.report_requests && !lod.shouldStop(t + offset_t, node_size(scale_exp)) && current_node.subdivided() && !current_node.pointer_valid())
|
||||
{
|
||||
this.parameters.request_buffer[current_node_index].requests[child_index].add(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user