sp614x / optifine

1.8k stars 418 forks source link

[Feature/Compatibility] Add fancy fog support for AMD/Intel GPUs #4731

Closed yezhiyi9670 closed 4 years ago

yezhiyi9670 commented 4 years ago

Description of the new feature

Indicated as a bug in #4363.

Please add fancy fog (this should include atmospheric effects such as underwater fog) support for AMD/Intel GPUs. This should not be impossible because it's just a simple calculation in screenspace. It's possible that some AMD cards support it (some of them use OpenGL 4.6) but Optifine refuses to render it.

sp614x commented 4 years ago

Radial fog on AMD/Intel can only be added with shaders. For example a simple shader pack can add only radial fog.

yezhiyi9670 commented 4 years ago

Can you provide such a pack?

yezhiyi9670 commented 4 years ago

Why not possible?

sp614x commented 4 years ago

I made a shader pack for radial fog long time ago, but can't find it now.

yezhiyi9670 commented 4 years ago

I made a shader pack for radial fog long time ago, but can't find it now.

I think writing such a pack is not a big deal, but I can't make it work correctly. I'll be very thankful if you can give me the pack.

My issues:

yezhiyi9670 commented 3 years ago

Radial fog on AMD/Intel can only be added with shaders.

Hey @sp614x. I have two systems on my AMD device: Windows and Linux Mint. I found that Fancy Fog is available for AMD on Linux. Is it just because it's Linux that this "solution" can't be ported to Windows?

Linux has the native support for gl_NV_fog_distance (which Minecraft uses) with Intel/AMD cards while Windows does not. It's because on Linux the devices are handled by the system instead of Intel/AMD's drivers. See here.

@sp614x says this is impossible simply because he doesn't want to do it, thinking shaders are a perfect solution to it (while they aren't). This should be able to be done within half an hour and the mods Sodium and Canvas Renderer have already done it (however they both forgot the clouds and skybox).

Cjnator38 commented 3 years ago

Seems like a really odd issue. On Windows, fancy fog doesn't work at all, but on Linux with the open source OpenGL/Mesa drivers it works perfectly.

sp614x commented 3 years ago

Simple shaderpack that enables fancy fog: RadialFog.zip