mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-28 20:35:04 +02:00
wip
This commit is contained in:
@@ -20,6 +20,7 @@ export type RoomControllerOptions = {
|
||||
graphicsQuality: number;
|
||||
fps: number | null;
|
||||
resolution: number;
|
||||
antialias: boolean;
|
||||
useVirtualJoystick?: boolean;
|
||||
};
|
||||
|
||||
@@ -84,7 +85,7 @@ export class RoomController {
|
||||
}
|
||||
};
|
||||
} else {
|
||||
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance', antialias: this.options.graphicsQuality >= GRAPHICS_QUALITY_MEDIUM });
|
||||
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance', antialias: this.options.antialias });
|
||||
babylonEngine.compatibilityMode = false;
|
||||
babylonEngine.enableOfflineSupport = false;
|
||||
babylonEngine.onContextLostObservable.add(() => {
|
||||
|
||||
@@ -226,6 +226,7 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
||||
engine: BABYLON.WebGPUEngine;
|
||||
graphicsQuality: number;
|
||||
fps: number | null;
|
||||
antialias: boolean;
|
||||
useVirtualJoystick?: boolean;
|
||||
}) {
|
||||
super();
|
||||
@@ -407,7 +408,9 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
||||
|
||||
if (options.graphicsQuality >= GRAPHICS_QUALITY_HIGH) {
|
||||
const pipeline = new BABYLON.DefaultRenderingPipeline('default', true, this.scene);
|
||||
pipeline.samples = 4;
|
||||
if (options.antialias) {
|
||||
pipeline.samples = 4;
|
||||
}
|
||||
|
||||
// snapshot renderingと相性が悪そう
|
||||
//pipeline.depthOfFieldEnabled = true;
|
||||
@@ -456,7 +459,6 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
||||
}).then(() => {
|
||||
loadedCount++;
|
||||
this.emit('loadingProgress', { progress: loadedCount / objects.length });
|
||||
console.log(`Loaded object ${o.id} (${o.type})`);
|
||||
})));
|
||||
|
||||
// 不具合のもと
|
||||
|
||||
@@ -17,7 +17,7 @@ onmessage = async (event) => {
|
||||
case 'init': {
|
||||
const roomState = event.data.roomState as RoomState;
|
||||
canvas = event.data.canvas as HTMLCanvasElement;
|
||||
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance', antialias: event.data.options.graphicsQuality >= GRAPHICS_QUALITY_MEDIUM });
|
||||
const babylonEngine = new BABYLON.WebGPUEngine(canvas, { doNotHandleContextLost: true, powerPreference: 'high-performance', antialias: event.data.options.antialias });
|
||||
babylonEngine.compatibilityMode = false;
|
||||
babylonEngine.enableOfflineSupport = false;
|
||||
await babylonEngine.initAsync();
|
||||
|
||||
Reference in New Issue
Block a user