mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-08 14:59:16 -04:00
chunk meshing: also prioritize direct neighbours
This commit is contained in:
parent
ea98f3275d
commit
8b0ac1944f
@ -74,8 +74,8 @@ class ChunkMeshingQueue(
|
||||
unlock()
|
||||
val camera = renderer.cameraSectionPosition
|
||||
for (item in items) {
|
||||
val distance = abs(item.position.x - camera.x) + abs(item.position.z - camera.z) // TODO: Check y?
|
||||
val runnable = HeavyPoolRunnable(if (distance < 1) ThreadPool.HIGH else ThreadPool.LOW, interruptable = true)
|
||||
val distance = abs(item.position.x - camera.x) + abs(item.position.z - camera.z) // TODO: Should y get in here too?
|
||||
val runnable = HeavyPoolRunnable(if (distance <= 1) ThreadPool.HIGH else ThreadPool.LOW, interruptable = true)
|
||||
val task = MeshPrepareTask(item.position, runnable)
|
||||
task.runnable.runnable = Runnable { renderer.mesher.tryMesh(item, task, task.runnable) }
|
||||
tasks += task
|
||||
|
Loading…
x
Reference in New Issue
Block a user