Make fog less prominent in HDR mode

This commit is contained in:
Vsevolod Kremianskii 2021-05-06 07:22:39 +07:00
parent 82c0398a24
commit c9a9e20a1f

View file

@ -937,9 +937,6 @@ void main() {
vec3 S = vec3(1.0) - max(vec3(0.0), vec3(getShadow()) - uGeneral.ambientColor.rgb);
objectColor *= S;
}
if (isFeatureEnabled(FEATURE_FOG)) {
objectColor = applyFog(objectColor, length(cameraToFragment));
}
float objectAlpha = uGeneral.alpha;
if (!isFeatureEnabled(FEATURE_ENVMAP) && !isFeatureEnabled(FEATURE_BUMPMAPS)) {
@ -956,6 +953,9 @@ void main() {
// gamma correct
objectColor = pow(objectColor, vec3(1.0 / GAMMA));
}
if (isFeatureEnabled(FEATURE_FOG)) {
objectColor = applyFog(objectColor, length(cameraToFragment));
}
vec3 brightColor = vec3(0.0);
if (isFeatureEnabled(FEATURE_SELFILLUM) && !isFeatureEnabled(FEATURE_WATER)) {