Fixing LOD policy
This commit is contained in:
@@ -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