# Unity - Set/Manipulate Render-Buffer for "Render Overlay Effects"

Note

This is more of a question on how/where to do furhter research into this topic becasue I do not know anything about it yet. If anyone has answers on how to accomplish this goal, I'd very much welcome it, too!

Background

I've been working on my own game (2D Arcade, Android) for quite a while and I'm currently adding "Sequences" which take controll of modular gameplay functionality and add some special behaviour as well as extra "challenges". To make the transitions more interesting - especcially transitions to bossfights and/or dramatic scenes

What I want to do

I want to perform some sort of render overlay: basically manipulating the render buffer to either

• Draw full colors (e.g. complete screen white PLUS fade out of white overlay)

and/or

• Manipulate - "mix" - all pixels colors with a specific color to achieve a color mix effect (as shown below, which is just some example)

I have no idea at all on how to do this. I could write a shader, but that would have to be applied to every single object in the scene (?). The white overlay effect could be done with a simple white sprite, but I'd find it more interesing to create an overlay effect which can accomplish tasks such as 'color mixing'

Edit

I'm currently looking into CommandBuffers which have a very sparse documentation on how to actually use them but they seem to be intended for things that are way more complicated than what I intend to do.

What I'd ideally imagine is a way to get the current render buffer as some sort of array, matrix or whatnot, containing information of each individual fragment (as some brief research turned up it's not actually pixels), copy it, make some operations on it and return it to the target renderer. Is there a way to do anything alike?

Have you looked into Camera.OnRenderImage()? It lets you write a shader to do post-processing effects, which is what it sounds like you want.

• After some fiddling, this seems to be what I was looking for.Thank you very very much! Just for the record, if anyone else finds this question and requires some further resources, here's a great tutorial I found: youtube link Apr 27, 2019 at 21:57