polish: scene nits — live-lens yard, square stacks, deck-clear billboard, two-layer lamps, flare reach, phone traffic and exposure

This commit is contained in:
2026-10-12 18:59:33 +03:00
parent 71465fa481
commit 3602eeb3d1
23 changed files with 671 additions and 73 deletions

View File

@@ -1,7 +1,7 @@
import { describe, expect, it, vi } from 'vitest';
import * as THREE from 'three';
import { SceneResourceBag } from '@/scene/resources';
import { renderQualityFor } from '@/scene/render-quality';
import { NO_POST_EXPOSURE_LIFT, renderQualityFor, tierExposure } from '@/scene/render-quality';
import { createChaseCamera } from '@/scene/world/environment';
import { createCar } from '@/scene/world/car';
import { routeLabelFor } from '@/scene/world/sign';
@@ -187,6 +187,14 @@ describe('scene render quality', () => {
});
});
it('lifts exposure only on the tier without bloom or post, and modestly', () => {
expect(tierExposure(1.12, renderQualityFor('high', 1, false))).toBe(1.12);
expect(tierExposure(1.12, renderQualityFor('medium', 1, false))).toBe(1.12);
expect(tierExposure(1.12, renderQualityFor('low', 1, true))).toBeCloseTo(1.12 * NO_POST_EXPOSURE_LIFT, 6);
expect(NO_POST_EXPOSURE_LIFT).toBeGreaterThan(1);
expect(NO_POST_EXPOSURE_LIFT).toBeLessThanOrEqual(1.25);
});
it('caps mobile and tablet pixel ratio at 1.5 even for High', () => {
expect(renderQualityFor('high', 3, true).pixelRatio).toBe(1.5);
});