Skip to content

Commit d41fe74

Browse files
committed
Change Occlusion Culling Buffer debug view to use log scaling
1 parent 19bb187 commit d41fe74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

servers/rendering/renderer_scene_occlusion_cull.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ RID RendererSceneOcclusionCull::HZBuffer::get_debug_texture() {
186186

187187
unsigned char *ptrw = debug_data.ptrw();
188188
for (int i = 0; i < debug_data.size(); i++) {
189-
ptrw[i] = MIN(mips[0][i] / debug_tex_range, 1.0) * 255;
189+
ptrw[i] = MIN(Math::log(1.0 + mips[0][i]) / Math::log(1.0 + debug_tex_range), 1.0) * 255;
190190
}
191191

192192
debug_image->set_data(sizes[0].x, sizes[0].y, false, Image::FORMAT_L8, debug_data);

0 commit comments

Comments
 (0)