Ok… been testing my game engine and this week decided to go for deferred fog.
All works fine.. except for… transparent geometry. Quite a few topics on this but basically because it doesn't write to the z-buffer fog ends up wrong for it.
Also… how to treat shadows. At the moment if transparent I just don't even worry about shadows.
Also… opaque stuff rendered front to back… and our transparent “friends” back to front.
Transparent adds at least 1 extra batch call and usually blend mode needs changing.
Been thinking about getting rid of semi-transparent geometry in my game.
OMG moment….
I stuffed up rendering of a test scene and my 20 by 20 array of geometry had some shapes only being drawn every second frame.
Thing is… these looked perfectly fine but 50% transparent, fog looked perfect… AND it cast 50% softer shadows where overlaps were also perfect. Bonus bit is all my transparent geometry has alpha at 50% and is only use for force fields, electric visors etc.
My game runs at 60 fps so… the 50% on/off for some geometry seems fine by me.
Posted a screen shot for reference… but as the effect is only when running… bit hard to see how nice it is.
Bit of a hack but it's simple and works. Hope this helps someone else.