Improve foliage rendering and visibility synchronization in ViewportHost

This commit is contained in:
2026-05-02 04:55:16 +02:00
parent 6e312864ac
commit efbc6359a0
3 changed files with 29 additions and 5 deletions

View File

@@ -18,7 +18,6 @@ import {
} from "./foliage-render-batches";
import type {
FoliageLayerRegistry,
FoliagePrototype,
FoliagePrototypeRegistry
} from "./foliage";
import {
@@ -203,7 +202,7 @@ export class FoliageInstancedRenderer {
return;
}
void this.rebuildBatchesAsync(requestId, batches, prototypeRegistry);
void this.rebuildBatchesAsync(requestId, batches);
}
dispose() {
@@ -232,8 +231,7 @@ export class FoliageInstancedRenderer {
private async rebuildBatchesAsync(
requestId: number,
batches: readonly FoliageRenderBatch[],
_prototypeRegistry: FoliagePrototypeRegistry
batches: readonly FoliageRenderBatch[]
) {
const nextBatchGroup = new Group();
nextBatchGroup.name = "foliageInstancedBatches";