I know how to import shaders and place them into cameras. But what I don’t get is how to place a distortion shader into it’s own camera that affects cameras below it too.
What I mean is: Given an array of cameras and an array of visible game objects how would I convert the positions of those game objects into screen coordinates that I can use as texture coordinates to put into the shader that goes on top of those cameras (maybe in it’s own camera or render texture?).
What I want is just a distortion shader that affects cameras below it based on the positions of visible game objects. I think I know what to do I just don’t know how to do it.
Here’s a link to the distortion code I want to use:
(It’s the second one)
In case you were wondering, I need this shader for black holes in my space game.