1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-23 07:34:09 +02:00

Update engine.ts

This commit is contained in:
syuilo
2026-04-24 16:43:04 +09:00
parent 82741c2d61
commit d281a81200

View File

@@ -327,6 +327,7 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
this.shadowGeneratorForRoomLight = new BABYLON.ShadowGenerator(2048, this.roomLight); this.shadowGeneratorForRoomLight = new BABYLON.ShadowGenerator(2048, this.roomLight);
this.shadowGeneratorForRoomLight.forceBackFacesOnly = true; this.shadowGeneratorForRoomLight.forceBackFacesOnly = true;
this.shadowGeneratorForRoomLight.bias = 0.00001; this.shadowGeneratorForRoomLight.bias = 0.00001;
this.shadowGeneratorForRoomLight.normalBias = 0.005;
this.shadowGeneratorForRoomLight.usePercentageCloserFiltering = true; this.shadowGeneratorForRoomLight.usePercentageCloserFiltering = true;
this.shadowGeneratorForRoomLight.filteringQuality = BABYLON.ShadowGenerator.QUALITY_HIGH; this.shadowGeneratorForRoomLight.filteringQuality = BABYLON.ShadowGenerator.QUALITY_HIGH;
if (options.graphicsQuality <= GRAPHICS_QUALITY_LOW) { if (options.graphicsQuality <= GRAPHICS_QUALITY_LOW) {
@@ -457,7 +458,10 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
this.scene.blockMaterialDirtyMechanism = true; this.scene.blockMaterialDirtyMechanism = true;
if (SNAPSHOT_RENDERING) { if (SNAPSHOT_RENDERING) {
this.sr.enableSnapshotRendering(); // 早く有効にしすぎることが原因かは不明だがクラッシュすることがあるので遅らせてみる
setTimeout(() => {
this.sr.enableSnapshotRendering();
}, 100);
} }
this.startRenderLoop(); this.startRenderLoop();
@@ -1381,7 +1385,7 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
private turnOnRoomLight(forInit = false) { private turnOnRoomLight(forInit = false) {
if (!forInit && SNAPSHOT_RENDERING) this.sr.disableSnapshotRendering(); // このメソッドは参照カウント方式な点に留意 if (!forInit && SNAPSHOT_RENDERING) this.sr.disableSnapshotRendering(); // このメソッドは参照カウント方式な点に留意
this.roomLight.intensity = 15 * WORLD_SCALE * WORLD_SCALE; this.roomLight.intensity = 18 * WORLD_SCALE * WORLD_SCALE;
this.envMapIndoor.level = 0.6; this.envMapIndoor.level = 0.6;
if (!forInit && SNAPSHOT_RENDERING) { if (!forInit && SNAPSHOT_RENDERING) {
setTimeout(() => { setTimeout(() => {