Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat(city): add post-bloom exposure slider to lighten assets without bloom
Ilya Eivy9a1557be8059
diff --git a/client/src/components/city/CityEffects.jsx b/client/src/components/city/CityEffects.jsxindex e6200f8b74..d0ef09e60d 100644--- a/client/src/components/city/CityEffects.jsx+++ b/client/src/components/city/CityEffects.jsx@@ -8,6 +8,34 @@ import * as THREE from 'three';extend({ EffectComposer, RenderPass, UnrealBloomPass, ShaderPass });+// Exposure/brightness lift shader -- applied after bloom so it brightens the scene+// without feeding extra luminosity into the bloom pass.+// Uses a reverse power curve: shadows lift dramatically, highlights barely change.+const ExposureShader = {+ uniforms: {+ tDiffuse: { value: null },+ uExposure: { value: 1.0 },+ },+ vertexShader: `+ varying vec2 vUv;+ void main() {+ vUv = uv;+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);+ }+ `,+ fragmentShader: `+ uniform sampler2D tDiffuse;+ uniform float uExposure;+ varying vec2 vUv;+ void main() {+ vec4 color = texture2D(tDiffuse, vUv);+ // Reverse power curve: lifts shadows/midtones, preserves highlights+ color.rgb = 1.0 - pow(max(1.0 - color.rgb, 0.0), vec3(1.0 / uExposure));+ gl_FragColor = color;+ }+ `,+};+// Chromatic Aberration shader -- offset R/B channels at screen edgesconst ChromaticAberrationShader = {uniforms: {@@ -113,6 +141,7 @@ export default function CityEffects({ settings }) {const bloomEnabled = settings?.bloomEnabled ?? true;const bloomStrength = settings?.bloomStrength ?? 0.5;+ const sceneExposure = settings?.sceneExposure ?? 1.0;const chromaticAberration = settings?.chromaticAberration ?? true;const filmGrain = settings?.filmGrain ?? true;const colorGrading = settings?.colorGrading ?? true;@@ -135,6 +164,14 @@ export default function CityEffects({ settings }) {composer.addPass(bloomPass);}+ // Exposure pass — runs after bloom so it lifts shadows/midtones+ // without feeding extra brightness into the bloom calculation+ if (sceneExposure !== 1.0) {+ const exposurePass = new ShaderPass(ExposureShader);+ exposurePass.uniforms.uExposure.value = sceneExposure;+ composer.addPass(exposurePass);+ }+if (colorGrading) {const cgPass = new ShaderPass(ColorGradingShader);composer.addPass(cgPass);@@ -159,7 +196,7 @@ export default function CityEffects({ settings }) {return () => {composer.dispose();};- }, [gl, scene, camera, size.width, size.height, bloomEnabled, bloomStrength, chromaticAberration, filmGrain, colorGrading]);+ }, [gl, scene, camera, size.width, size.height, bloomEnabled, bloomStrength, sceneExposure, chromaticAberration, filmGrain, colorGrading]);useFrame(({ clock }) => {if (grainPassRef.current) {diff --git a/client/src/components/city/CitySettingsPanel.jsx b/client/src/components/city/CitySettingsPanel.jsxindex a8eff82b12..85895e198f 100644--- a/client/src/components/city/CitySettingsPanel.jsx+++ b/client/src/components/city/CitySettingsPanel.jsx@@ -254,6 +254,16 @@ export default function CitySettingsPanel() {{/* Scene Lighting */}<div><SectionHeader title="SCENE LIGHTING" subtitle="Brightness and time of day" />+ <SettingSlider+ label="EXPOSURE"+ value={settings.sceneExposure ?? 1.0}+ onChange={(v) => updateSetting('sceneExposure', v)}+ min={0.5}+ max={2.5}+ step={0.1}+ format={(v) => `${v.toFixed(1)}x`}+ description="Post-bloom brightness lift — brightens assets without adding bloom"+ /><SettingSliderlabel="AMBIENT BRIGHTNESS"value={settings.ambientBrightness}diff --git a/client/src/hooks/useCitySettings.js b/client/src/hooks/useCitySettings.jsindex fe25abaee4..a4c5622852 100644--- a/client/src/hooks/useCitySettings.js+++ b/client/src/hooks/useCitySettings.js@@ -10,6 +10,7 @@ const QUALITY_PRESETS = {particleDensity: 0.5, scanlineOverlay: false,ambientBrightness: 1.0,neonBrightness: 1.0,+ sceneExposure: 1.0,dpr: [1, 1],},medium: {@@ -19,6 +20,7 @@ const QUALITY_PRESETS = {particleDensity: 0.75, scanlineOverlay: true,ambientBrightness: 1.0,neonBrightness: 1.0,+ sceneExposure: 1.0,dpr: [1, 1.25],},high: {@@ -28,6 +30,7 @@ const QUALITY_PRESETS = {particleDensity: 1.0, scanlineOverlay: true,ambientBrightness: 1.2,neonBrightness: 1.2,+ sceneExposure: 1.0,dpr: [1, 1.5],},ultra: {@@ -37,6 +40,7 @@ const QUALITY_PRESETS = {particleDensity: 1.5, scanlineOverlay: true,ambientBrightness: 1.5,neonBrightness: 1.5,+ sceneExposure: 1.2,dpr: [1, 2],},};