There are a lot of questions on Unity Answers about replicating Battlefield3 style bokeh, camera dust and scratch effects but I haven’t found an answer to a specific related effect. Any input or advice would be appreciated – am I on the right track? I’m trying to replicate the bokeh effect found on the iOS game N.O.V.A 3.
Ignoring the horizontal lens flares, just the bokeh looks to be a simple tiled texture with alpha. That is simple enough, apply a texture to a plane in front of the camera and you have a bokeh effect however its static and doesn’t react to the light in the scene. In the N.O.V.A 3 example the bokeh only shows up in areas where the background is light and is completely transparent in dark areas. Note there is a falloff transition on the effect, so the bokeh carries on past the edges of the light source.
I’ve assumed this can be accomplished via shader? However, my scene does not contain any actual lighting as everything is baked for performance with iOS being the target platform. Is there a shader that will render an alpha texture with less alpha on light areas and more alpha on dark areas of the background? I’ve run through the gambit of default shaders including the particle shaders, so I imagine something more custom is required?
Am I on the right track or is there another technique?