Enhanced sky atmosphere with DBC-driven colors, sun lighting, and zone weather

- Skybox now uses DBC sky colors (skyTop/skyMiddle/skyBand1/skyBand2) instead
  of hardcoded C++ color curves, with 3-band gradient and Rayleigh/Mie scattering
- Clouds receive sun direction for lit edges, self-shadowing, and silver lining
- Fixed sun quad box artifact with proper edge fade in celestial shader
- Lens flare attenuated by fog, cloud density, and weather intensity
- Replaced garish green/purple lens flare ghosts with warm natural palette
- Added zone-based weather system for single-player mode with per-zone rain/snow
  configuration, probability-based activation, and smooth intensity transitions
- Server SMSG_WEATHER remains authoritative when connected to a server
This commit is contained in:
Kelsi 2026-02-22 23:20:13 -08:00
parent 085fd09b9d
commit 6563eebb60
18 changed files with 434 additions and 252 deletions

View file

@ -105,9 +105,9 @@ void SkySystem::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet,
return;
}
// --- Skybox (authoritative sky gradient) ---
// --- Skybox (authoritative sky gradient, DBC-driven colors) ---
if (skybox_) {
skybox_->render(cmd, perFrameSet, params.timeOfDay);
skybox_->render(cmd, perFrameSet, params);
}
// --- Procedural stars (debug / fallback) ---
@ -133,15 +133,17 @@ void SkySystem::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet,
&params.directionalDir, &params.sunColor, params.gameTime);
}
// --- Clouds ---
// --- Clouds (DBC-driven colors + sun lighting) ---
if (clouds_) {
clouds_->render(cmd, perFrameSet, params.timeOfDay);
clouds_->render(cmd, perFrameSet, params);
}
// --- Lens flare ---
// --- Lens flare (attenuated by atmosphere) ---
if (lensFlare_) {
glm::vec3 sunPos = getSunPosition(params);
lensFlare_->render(cmd, camera, sunPos, params.timeOfDay);
lensFlare_->render(cmd, camera, sunPos, params.timeOfDay,
params.fogDensity, params.cloudDensity,
params.weatherIntensity);
}
}