occlusion culling: trace x->z->y

That should improve cpu caching and improve performance
This commit is contained in:
Moritz Zwerger 2023-10-08 15:24:55 +02:00
parent b0a0bcf316
commit b028e8f913
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -73,10 +73,10 @@ class SectionOcclusion(
if (x > 0) trace(regions, x - 1, y, z, nextId)
if (x < ProtocolDefinition.SECTION_MAX_X) trace(regions, x + 1, y, z, nextId)
if (y > 0) trace(regions, x, y - 1, z, nextId)
if (y < ProtocolDefinition.SECTION_MAX_Y) trace(regions, x, y + 1, z, nextId)
if (z > 0) trace(regions, x, y, z - 1, nextId)
if (z < ProtocolDefinition.SECTION_MAX_Z) trace(regions, x, y, z + 1, nextId)
if (y > 0) trace(regions, x, y - 1, z, nextId)
if (y < ProtocolDefinition.SECTION_MAX_Y) trace(regions, x, y + 1, z, nextId)
}
private fun floodFill(): ShortArray {