zesterer / openmw-volumetric-clouds

A volumetric clouds mod for OpenMW
80 stars 12 forks source link

Skybox and clouds appear in front of torch and candle fire #29

Open vidfail opened 1 year ago

vidfail commented 1 year ago

Firstly - amazing job. This mod is incredible, and adds an irreplaceable amount of atmosphere to the game.

The one noticeable issue is that clouds and the skybox appear in front of torch and candle fire. Not sure if this is a duplicate of #4 or #7. I tried enabling "antialias alpha test", but this doesn't seem to make a difference.

openmw_egbWwBJiX4

zesterer commented 1 year ago

It's a duplicate of both issues you mention, unfortunately.

Because this is a post-processing shader, it gets 'painted' on top of the screen after regular rendering has been done. For entirely opaque objects, that's fine: we have a depth buffer we can use to measure how far away elements are in the scene and calculate how much cloud we should be applying on top of them.

Sadly, translucent objects do not appear in the depth buffer (and even if they did, we won't be able to differentiate their colour from that of the background they were applied on top of) so we can't sensible mix clouds into the scene in their presence.

There is a possibility that upstream changes to OpenMW might provide some (hacky) solutions to this problem, but - to my knowledge - it's not happened yet.