I need to somehow draw multiple transparent full screen image overlays with a custom shader.
What’s the best approach to do this?
I was thinking about Graphics.Blit-ting those similar to what vignette image post fx does.
But it seems like not really optimal solution. Multiple blitting of the full screen doesn’t sound right.
Will simply rendering those on top of each other (like via Graphics.DrawMeshInstanced on full screen) would be better?
Target platform is PC, so it can handle some draw calls. This is also on deferred rendering path.
Hi,
First answer which render pipeline you intend to use. The solution depends a lot on that and it would probably make answering easier.
I don’t think there’s any way getting around if you want to accumulate something to an image, but you can reduce the load by rendering things in lower resolution if you decide to make a post-process effect. Same principle works for old post-processing effects, Post-processing stack v2 and HDRP. There’s no proper custom post-processing support for URP at the moment.
Also, I’ve thought about this effect, and think I might get away with simply combining properties.
Like single texture (or a texture array) + some cleaver rotation tricks / color combining via shader.
Effect won’t be as nice, but it would require only one blit.
Well, if you are using built-in, I’d definitely make a custom post-processing stack v2 post effect. I’ve done a few and it didn’t seem to have that drastic effect on the rendering even though I did a lot of blits… Better try it out and see how well it performs.