Skip to content

Commit

Permalink
Fixed incorrect sky color causing the horizon to be visible through t…
Browse files Browse the repository at this point in the history
…he fog
  • Loading branch information
NaoCraftLab committed Oct 13, 2024
1 parent 65d810f commit 71c4b70
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.21.2-2.4.1

### Fixed

- Incorrect sky color causing the horizon to be visible through the fog

## 1.21.2-2.4.0

### Added
Expand Down
6 changes: 2 additions & 4 deletions docs/presets/custom/SNOWY_VEIL.v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"opacity": 95.0,
"encapsulationSpeed": 6.0,
"brightness": {
"mode": "BY_GAME_FOG",
"adjustment": 0.5
"mode": "BY_GAME_FOG"
},
"color": {
"mode": "BY_GAME_FOG",
Expand All @@ -39,8 +38,7 @@
"opacity": 100.0,
"encapsulationSpeed": 6.0,
"brightness": {
"mode": "BY_GAME_FOG",
"adjustment": 0.5
"mode": "BY_GAME_FOG"
},
"color": {
"mode": "BY_GAME_FOG",
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.parallel=true
group=com.naocraftlab
modId=foggy-pale-garden
modCurseForgeId=1114471
modVersion=2.4.0
modVersion=2.4.1
modName=Foggy Pale Garden
modDescription=Adds dense fog to the Pale Garden biome.
modLicense=MIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ private static void injectApplyFog(
assert fogCharacteristics.color().alpha() >= 0.0f : "FPG: Alpha color component is negative";
assert fogCharacteristics.color().alpha() <= 1.0f : "FPG: Alpha color component is greater than 1.0";

color.x = color.x * (1.0f - fogDensity) + fogCharacteristics.color().red() * fogDensity;
color.y = color.y * (1.0f - fogDensity) + fogCharacteristics.color().green() * fogDensity;
color.z = color.z * (1.0f - fogDensity) + fogCharacteristics.color().blue() * fogDensity;
color.w = color.w * (1.0f - fogDensity) + fogCharacteristics.color().alpha() * fogDensity;

cir.setReturnValue(fogOf(fogCharacteristics));
cir.cancel();
}
Expand Down

0 comments on commit 71c4b70

Please sign in to comment.