mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: sync cloud density with weather intensity and DBC cloud coverage
Cloud renderer's density was hardcoded at 0.35 and never updated from the DBC-driven cloudDensity parameter. Now setDensity() is called each frame with the lighting manager's cloud coverage value. Active weather (rain/ snow/storm) additionally boosts cloud density by up to 0.4 so clouds visibly thicken during storms.
This commit is contained in:
parent
d7d6819855
commit
b3f406c6d3
1 changed files with 8 additions and 0 deletions
|
|
@ -135,6 +135,14 @@ void SkySystem::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet,
|
|||
|
||||
// --- Clouds (DBC-driven colors + sun lighting) ---
|
||||
if (clouds_) {
|
||||
// Sync cloud density with weather/DBC-driven cloud coverage.
|
||||
// Active weather (rain/snow/storm) increases cloud density for visual consistency.
|
||||
float effectiveDensity = params.cloudDensity;
|
||||
if (params.weatherIntensity > 0.05f) {
|
||||
float weatherBoost = params.weatherIntensity * 0.4f; // storms add up to 0.4 density
|
||||
effectiveDensity = glm::min(1.0f, effectiveDensity + weatherBoost);
|
||||
}
|
||||
clouds_->setDensity(effectiveDensity);
|
||||
clouds_->render(cmd, perFrameSet, params);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue