Dynamic Fog Weather Effect – Shogun Exodus Devlog #39

A wide panoramic black and white ink wash painting depicts a samurai in traditional armor standing on a precipice looking toward a sprawling futuristic city nestled among misty mountains.
Update #197 for Shogun Exodus implements a comprehensive Fog weather effect, introducing dynamic atmospheric visual presets across the game world. Powered by an optimized shader and noise texture pipeline, the update delivers Light Fog, Fog, and Heavy Fog conditions that smoothly transition over in-game time. The fog animation scales with game speed, respects pause states, responds to environmental wind parameters, and inherits day, night, dawn, and dusk lighting while utilizing layered depth sheets across background and middleground environments.

In addition to atmospheric visuals, the fog rendering system is designed for performance with minimal CPU overhead. The update also includes a dedicated visual testing interface within the developer tools for live density, contrast, and color adjustments, alongside new player-facing loading screen hints and updated technical documentation.


Raw Patch Notes

UPDATE 2026-08-24 #197 - Fog Effect
- Added one reusable `fog_sheet` Weather Effect on the `foreground` Atmosphere host. One viewport-sized TextureRect, one shared 512x512 seamless unnormalized NoiseTexture2D/Simplex Smooth FastNoiseLite resource, and one ShaderMaterial preserve the approved three-sample UV movement and nested blend. Final tuning uses the continuous Original density model and `#9ecacdde` tint.
- Replaced shader TIME with separate renderer-owned X/Y phases driven by TimeSystem's cached effective scale. Fog movement freezes on soft pause, scales at x1/x2/x4, and preserves its position across pause/speed changes. All presets use intrinsic animation speed 0.9. Fog now opts into the generic Wind input at 25% response: cached/interpolated endpoints affect only future X accumulation, Y remains intrinsic, and changes never jump phase. The existing Fog Condition's Wind planning requirements remain unchanged; at 20 km/h the visual multiplier resolves to about 0.90 and at the global 30 km/h calibration it is 1.0.
- Preserved Foreground day/night/dawn/dusk inheritance through a vertex-stage modulation varying, avoiding the unintended fourth noise multiplication that fragment input COLOR would introduce for a TextureRect using its default texture.
- Enabled and finalized Light Fog, Fog, and Heavy Fog as separate presets of the same Effect. They share opacity 1.0, Original mode, tint `#9ecacdde`, and animation speed 0.9; density multiplier/internal contrast are respectively 0.8/2.4, 1.2/2.0, and 1.6/1.2. All four Fog destinations, including `none`, use one-game-hour game-time fades; density and contrast interpolate between intensities. Existing weights, Rainfall balance, dwell durations, graph transitions, and Wind/Temperature entry/persistence rules remain unchanged. HUD, Dev Tools, planning, save/load, and binder lifecycle reuse their existing generic paths.
- Added one reusable `SolidColorSheet` Weather renderer. `fog_depth_sheet` on `mountains` now supplies white opacity 0.2/0.4/0.4 for Light/normal/Heavy. Heavy additionally requests `fog_middleground_sheet`, a second effect id reusing the same scene at white opacity 0.4 on `middleground`. Both use the destination Fog state's one-game-hour fade for entry and removal, so normal transitions never hard-clip; their tiny CPU work reports independently under `weather_fx/fog_depth_sheet` and `weather_fx/fog_middleground_sheet`.
- Added disjoint CPU profiling through the existing `weather_fx/fog_sheet` helper and active-effect report context. The renderer performs no CPU pixel work, particles, world-sized allocation, SubViewport/CanvasGroup, controller, timer, tick, room scan, or Servant scan.
- Added a dedicated, scrollable Fog Visual Testing page under Dev Tools -> Weather -> Fog with Normal, opaque raw Sample 1/2/3, opaque Blended Noise, opaque Remapped Density, and opaque Final Alpha views. Screenshot comparison confirmed that all individual samples were healthy but the blend occupied a narrow grey range. A soft `0.4`-to-`0.75` remap was tested and retained only as an optional diagnostic because it read as screen-wide clouds; the final presets use Original plus continuous midpoint Internal Contrast. The page provides exact Original/Density Remap A/B, live RGBA tint, Density Low/High/Multiplier, Internal Contrast, Animation Speed, and mountain-sheet opacity. Small optional `WeatherEffectBase` debug hooks plus binder-side scene-local caches apply views/overrides immediately or to the next relevant renderer if inactive without altering Condition data, planning, saves, presets, or the Weather mixer.
- Updated the generic Weather effect test harness default to `fog_sheet` on `foreground`, documented the renderer/modding/draw-order contracts and follow-up depth treatment, recorded the remaining Light/Heavy tuning, and added a player-facing Fog loading hint.
- Files: `Scenes/Enviroment/Weather_Systems/FogSheet.tscn`, `Scripts/Weather_Systems/FogSheet.gd`, `Scripts/Weather_Systems/FogSheet.gdshader`, `Scenes/Enviroment/Weather_Systems/SolidColorSheet.tscn`, `Scripts/Weather_Systems/SolidColorSheet.gd`, `Scripts/Weather_Systems/WeatherEffectBase.gd`, `Scripts/Weather_Systems/WeatherEffectsBinder.gd`, `Scripts/DevTools/DevToolsMenu.gd`, `Data/Weather_Systems/Effects/fog_effects.json`, `Data/Weather_Systems/Effects/fog_depth_sheet_effects.json`, `Data/Weather_Systems/Effects/fog_middleground_sheet_effects.json`, `Data/Weather_Systems/conditions.json`, `Data/LoadingScreenText.json`, `Scenes/TestScenesDev/WeatherEffectTestScene.tscn`, `DeveloperFiles/Weather_System_Explainer.txt`, `DeveloperFiles/World_Background_Explainer.txt`, `DeveloperFiles/current-game-setup.txt`, `DeveloperFiles/mod-guide.txt`, `DeveloperFiles/temporary-data-fix-later.txt`, `DeveloperFiles/briefs/fog-effect-baseline-brief.md`, `DeveloperFiles/update-log.txt`.

*This is an automated post, using Python and LLMs to summarize game updates. Mistakes, while rare, may happen.


Leave a Reply

Your email address will not be published. Required fields are marked *