You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Change Occlusion Culling Buffer debug view to use log scaling
This commit is contained in:
@@ -186,7 +186,7 @@ RID RendererSceneOcclusionCull::HZBuffer::get_debug_texture() {
|
||||
|
||||
unsigned char *ptrw = debug_data.ptrw();
|
||||
for (int i = 0; i < debug_data.size(); i++) {
|
||||
ptrw[i] = MIN(mips[0][i] / debug_tex_range, 1.0) * 255;
|
||||
ptrw[i] = MIN(Math::log(1.0 + mips[0][i]) / Math::log(1.0 + debug_tex_range), 1.0) * 255;
|
||||
}
|
||||
|
||||
debug_image->set_data(sizes[0].x, sizes[0].y, false, Image::FORMAT_L8, debug_data);
|
||||
|
||||
Reference in New Issue
Block a user