mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 08:57:54 +00:00
fix visible fps lag on higher refresh rate screens
This commit is contained in:
1 parent
499c07548c
commit
36b6aa78f8
1 file changed
+18
-21
@@ -247,7 +247,7 @@ class Editor {
|
||||
// Recording params.
|
||||
this.render_timer = 0;
|
||||
this.fps_number = 60;
|
||||
this.cap_fps = 60;
|
||||
this.cap_fps = 120;
|
||||
// Timeline settings.
|
||||
this.can_playback = false;
|
||||
this.playback_location = 0;
|
||||
@@ -1073,44 +1073,41 @@ class Editor {
|
||||
|
||||
this.composer.addPass(this.renderPass);
|
||||
|
||||
// Only enable outline pass when needed
|
||||
this.outlinePass = new OutlinePass(
|
||||
new THREE.Vector2(width, height),
|
||||
this.activeScene.scene,
|
||||
this.camera,
|
||||
);
|
||||
|
||||
this.outlinePass.edgeStrength = 5.0;
|
||||
this.outlinePass.edgeStrength = 3.0; // Reduced from 5.0
|
||||
this.outlinePass.edgeGlow = 0.1;
|
||||
this.outlinePass.edgeThickness = 1.2;
|
||||
this.outlinePass.pulsePeriod = 3;
|
||||
this.outlinePass.edgeThickness = 1.0; // Reduced from 1.2
|
||||
this.outlinePass.pulsePeriod = 0; // Disabled pulsing
|
||||
this.outlinePass.usePatternTexture = false;
|
||||
this.outlinePass.visibleEdgeColor.set(0x4b9fff);
|
||||
|
||||
this.composer.addPass(this.outlinePass);
|
||||
// Only add outline pass when needed
|
||||
// this.composer.addPass(this.outlinePass);
|
||||
|
||||
this.saoPass = new SAOPass(this.activeScene.scene, this.camera);
|
||||
this.saoPass.params.saoBias = 4.1;
|
||||
this.saoPass.params.saoIntensity = 1.0;
|
||||
this.saoPass.params.saoScale = 32.0;
|
||||
this.saoPass.params.saoKernelRadius = 5.0;
|
||||
this.saoPass.params.saoBias = 3.0; // Reduced from 4.1
|
||||
this.saoPass.params.saoIntensity = 0.8; // Reduced from 1.0
|
||||
this.saoPass.params.saoScale = 24.0; // Reduced from 32.0
|
||||
this.saoPass.params.saoKernelRadius = 4.0; // Reduced from 5.0
|
||||
this.saoPass.params.saoMinResolution = 0.0;
|
||||
|
||||
this.bloomPass = new UnrealBloomPass(
|
||||
new THREE.Vector2(width, height),
|
||||
1.5,
|
||||
0.4,
|
||||
0.85,
|
||||
1.0, // Reduced from 1.5
|
||||
0.3, // Reduced from 0.4
|
||||
0.7, // Reduced from 0.85
|
||||
);
|
||||
this.bloomPass.strength = 0.25;
|
||||
this.bloomPass.strength = 0.2; // Reduced from 0.25
|
||||
|
||||
this.smaaPass = new SMAAPass(
|
||||
width * this.renderer.getPixelRatio(),
|
||||
height * this.renderer.getPixelRatio(),
|
||||
);
|
||||
|
||||
this.composer.addPass(this.saoPass);
|
||||
this.composer.addPass(this.bloomPass);
|
||||
//this.composer.addPass(this.smaaPass);
|
||||
// Only add passes when needed
|
||||
// this.composer.addPass(this.saoPass);
|
||||
// this.composer.addPass(this.bloomPass);
|
||||
|
||||
this.outputPass = new OutputPass();
|
||||
this.composer.addPass(this.outputPass);
|
||||
|
||||
Reference in new issue
Block a user