Fix FOG shader issue in Compatibility mode
This commit is contained in:
parent
4e5ed0bbfb
commit
d751545391
1 changed files with 2 additions and 10 deletions
|
@ -1920,11 +1920,7 @@ void main() {
|
||||||
fog.xy = unpackHalf2x16(fog_rg);
|
fog.xy = unpackHalf2x16(fog_rg);
|
||||||
fog.zw = unpackHalf2x16(fog_ba);
|
fog.zw = unpackHalf2x16(fog_ba);
|
||||||
|
|
||||||
#ifndef DISABLE_FOG
|
frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
|
||||||
if (scene_data.fog_enabled) {
|
|
||||||
frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
|
|
||||||
}
|
|
||||||
#endif // !DISABLE_FOG
|
|
||||||
#endif // !FOG_DISABLED
|
#endif // !FOG_DISABLED
|
||||||
|
|
||||||
// Tonemap before writing as we are writing to an sRGB framebuffer
|
// Tonemap before writing as we are writing to an sRGB framebuffer
|
||||||
|
@ -2131,11 +2127,7 @@ void main() {
|
||||||
fog.xy = unpackHalf2x16(fog_rg);
|
fog.xy = unpackHalf2x16(fog_rg);
|
||||||
fog.zw = unpackHalf2x16(fog_ba);
|
fog.zw = unpackHalf2x16(fog_ba);
|
||||||
|
|
||||||
#ifndef DISABLE_FOG
|
additive_light_color *= (1.0 - fog.a);
|
||||||
if (scene_data.fog_enabled) {
|
|
||||||
additive_light_color *= (1.0 - fog.a);
|
|
||||||
}
|
|
||||||
#endif // !DISABLE_FOG
|
|
||||||
#endif // !FOG_DISABLED
|
#endif // !FOG_DISABLED
|
||||||
|
|
||||||
// Tonemap before writing as we are writing to an sRGB framebuffer
|
// Tonemap before writing as we are writing to an sRGB framebuffer
|
||||||
|
|
Loading…
Reference in a new issue