fix(scene): remove exit-gate flashes and sub-3 Hz-unsafe flickers

This commit is contained in:
2026-10-10 22:04:09 +03:00
parent 298da54871
commit 32eb3e4d40
7 changed files with 15 additions and 157 deletions

View File

@@ -224,11 +224,11 @@ export function createDistricts(
varying float vRise;
void main() {
${FADES}
// Neon tubes catch as the district finishes rising: a brief
// stutter, then steady (no per-instance CPU work).
// Neon tubes warm up as the district finishes rising. A smooth
// ignite, never a stutter: nothing in the scene flashes faster
// than 3 Hz (photosensitivity, round 5).
float on = smoothstep(0.8, 1.0, vRise);
float stutter = step(0.35, fract(sin(floor(uTime * 22.0) + vWorld.z * 0.07) * 43758.5));
on *= mix(stutter, 1.0, step(0.985, vRise));
on *= on;
vec3 tone = mix(vec3(0.55, 0.95, 1.0), uAccent, ${accentMix.toFixed(2)});
// Close passes dim, so overhead neon never floods the bloom pass.
float near = mix(0.3, 1.0, smoothstep(5.0, 32.0, vDepth));