fix(world): throttle shadows and tune high preset

This commit is contained in:
Tom Boullay
2026-06-01 10:45:07 +02:00
parent bafca5a936
commit 6d58b90856
7 changed files with 112 additions and 26 deletions
+6
View File
@@ -45,6 +45,11 @@ function forceSceneShadowPass(
});
}
function restoreManualShadowUpdates(gl: THREE.WebGLRenderer): void {
gl.shadowMap.autoUpdate = false;
gl.shadowMap.needsUpdate = true;
}
export function SceneShadowWarmup({
active,
onReady,
@@ -77,6 +82,7 @@ export function SceneShadowWarmup({
secondFrame = window.requestAnimationFrame(() => {
forceSceneShadowPass(gl, scene);
restoreManualShadowUpdates(gl);
invalidate();
onReady();
});