render: manually correct gamma before fog calculations

This commit is contained in:
2022-01-21 21:07:39 +08:00
parent f4f784a7d3
commit 73669001c3
2 changed files with 1 additions and 3 deletions

View File

@ -41,12 +41,12 @@ void main() {
color += vec4(texpixel.rgb * light, 0.0f);
color.a = texpixel.a;
color.rgb = pow(color.rgb, vec3(1.0/gamma));
float z = gl_FragCoord.z / gl_FragCoord.w;
float fog = clamp(exp(-fogDensity * z * z), 0.2, 1);
outputColor = mix(fogColor, color, fog);
//outputColor.rgb = pow(outputColor.rgb, vec3(1.0/gamma));
}
void lightSun() {