I’ve been working on a material pattern for post isolation, its not finished yet, but so far… with a simple tweak, any material can have post filters applied to it alone rather than the entire scene. It can be used to blur only some items in a scene, use volumes to define where fog is to be draw, it’s a cornerstone of soft particles, and can be used for a post glass shader [discussed here].
The scene setup above is 10 randomly placed blue cubes, and a semi transparent yellow cube that is using a very simple post filter, it offsets the scene x by 0.05%. Even with such a simple test setup it has the beginnings of a decent glass type effect.
I can now move on to finishing some particle updates.
@pspeed thanks, perhaps before getting the refracted pixel, I might be able to check the refracted depth and make sure its not closer than the depth of the current frag… of course not ideal and will probably lead to weird ghosting but I guess this is a very fast approximation, not a raytraced render. If I did a backface pass, the same trick could be used to achieve passable reflections perhaps.