Skip to content

Commit

Permalink
fix: fix black squares issue and bring back puddles (doodlum#191)
Browse files Browse the repository at this point in the history
* fix: fix black squares issue and bring back puddles

* style: 🎨 apply clang-format changes

* fix: added a reasonable minimum for PuddleMaxAngle

---------

Co-authored-by: TheRiverwoodModder <TheRiverwoodModder@users.noreply.github.com>
  • Loading branch information
TheRiverwoodModder and TheRiverwoodModder authored Feb 27, 2024
1 parent 878ec8a commit 500585b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
float puddle = wetness;
if (wetness > 0.0 || puddleWetness > 0) {
# if !defined(SKINNED)
puddle = noise(puddleCoords) * 0.25 + 0.75;
puddle = noise(puddleCoords) * ((minWetnessAngle / perPassWetnessEffects[0].PuddleMaxAngle) * perPassWetnessEffects[0].MaxPuddleWetness * 0.25) + 0.5;
wetness = lerp(wetness, puddleWetness, saturate(puddle - 0.25));
# endif
puddle *= wetness;
Expand Down
2 changes: 1 addition & 1 deletion src/Features/WetnessEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void WetnessEffects::DrawSettings()
"The radius that is used to determine puddle size and location. ");
}

ImGui::SliderFloat("Puddle Max Angle", &settings.PuddleMaxAngle, 0.0f, 1.0f);
ImGui::SliderFloat("Puddle Max Angle", &settings.PuddleMaxAngle, 0.6f, 1.0f);
if (auto _tt = Util::HoverTooltipWrapper()) {
ImGui::Text(
"How flat a surface needs to be for puddles to form on it. ");
Expand Down

0 comments on commit 500585b

Please sign in to comment.