Skip to content

Commit

Permalink
Fix vanilla sky mode not rendering, Fix vanilla sky looks patchy at s…
Browse files Browse the repository at this point in the history
…unset

...broken since `Messed with horizon, water fog, fresnel, and bloom (oh no)`
...due to wrong define location

...broken since `Fix (vanilla) sky, cleanup`
...due to using step to detect sun
  • Loading branch information
spiralhalo committed Dec 27, 2021
1 parent 3f2032b commit 8c7e39a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/lumi/shaders/common/contrast.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ const float USER_NIGHT_AMBIENT_MULTIPLIER = clamp(NIGHT_AMBIENT_BRIGHTNESS, 0,

// SKY COLORS
#define DEF_VANILLA_DAY_SKY_COLOR hdr_fromGamma(vec3(0.52, 0.69, 1.0))
#define DEF_LUMI_AZURE vec3(0.425, 0.623333, 0.85)

#if SKY_MODE == SKY_MODE_LUMI

#define DEF_NEBULAE_COLOR vec3(0.8, 0.3, 0.6)
#define _0_DEF_NIGHT_SKY_COLOR mix(vec3(0.1, 0.1, 0.2), vec3(0.2, 0.25, 0.4), clamp(USER_NIGHT_AMBIENT_MULTIPLIER, 0.0, 1.0))
#define DEF_LUMI_AZURE vec3(0.425, 0.623333, 0.85)

#if LUMI_SKY_COLOR == LUMI_SKY_COLOR_NATURAL_AZURE
#define DEF_DAY_SKY_COLOR hdr_fromGamma(DEF_LUMI_AZURE)
Expand Down
3 changes: 1 addition & 2 deletions assets/lumi/shaders/prog/sky.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ vec4 customSky(sampler2D sunTexture, sampler2D moonTexture, vec3 toSky, vec3 fal
#else
float mul = 1.0 + frx_worldIsMoonlit * frx_skyLightTransitionFactor;
vec3 fallback1 = hdr_fromGamma(fallback) * mul;
float shine = step(1.0, l2_max3(fallback1));
result.rgb = mix(fog(vec4(fallback1, 1.0), toSky * frx_viewDistance * 4.0, toSky, isUnderwater).rgb, fallback1, shine);
result.rgb = fog(vec4(fallback1, 1.0), toSky * frx_viewDistance * 4.0, toSky, isUnderwater).rgb;
#endif

#if SKY_MODE == SKY_MODE_LUMI || SKY_MODE == SKY_MODE_VANILLA_STARRY
Expand Down

0 comments on commit 8c7e39a

Please sign in to comment.