Skip to content

Commit 7a5430a

Browse files
authored
revert i guess
1 parent 20833a8 commit 7a5430a

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

shaders/program/gbuffers_skybasic.glsl

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,19 @@ void main() {
107107
vec4 viewPos = gbufferProjectionInverse * (screenPos * 2.0 - 1.0);
108108
viewPos /= viewPos.w;
109109
vec3 nViewPos = normalize(viewPos.xyz);
110+
vec3 SkyColorPlayerPos = mix(vec3(1.0, 1.0, 1.0), vec3(0.07, 0.0, 0.2), atmFadeoutFactor);
110111

111112
float VdotU = dot(nViewPos, upVec);
112113
float VdotS = dot(nViewPos, sunVec);
113114
float dither = Bayer8(gl_FragCoord.xy);
114115

115-
#ifdef FADE_OUT_ATMOSPHERE
116-
color.rgb = mix(GetSky(VdotU, VdotS, dither, true, false), vec3(0.0), atmFadeoutFactor);
117-
#else
118-
color.rgb = GetSky(VdotU, VdotS, dither, true, false);
119-
#endif
120-
121-
#ifdef ST_TOGGLE
122-
float SkyColorPlayerPosMult = clamp((cameraPosition.y - ST_HEIGHT) / (400 - ST_HEIGHT), 0.0, 1.0);
123-
vec3 SkyColorPlayerPos = mix(vec3(1.0, 1.0, 1.0), vec3(ST_R, ST_G, ST_B), SkyColorPlayerPosMult);
124-
color.rgb *= SkyColorPlayerPos;
125-
#endif
126-
116+
#ifdef FADE_OUT_ATMOSPHERE
117+
color.rgb = mix(GetSky(VdotU, VdotS, dither, true, false), vec3(0.0), atmFadeoutFactor);
118+
#else
119+
color.rgb = GetSky(VdotU, VdotS, dither, true, false);
120+
#endif
121+
122+
color.rgb *= SkyColorPlayerPos;
127123
#ifdef SECRET_CAELUM_SUPPORT_SETTING
128124
if (alphaColor < 1.0 && alphaColor > 0.0) color.rgb = glColor.rgb * alphaColor;
129125
#endif

0 commit comments

Comments
 (0)