Now that we have our simple screen effect system up and running, let's take a look at some of the other useful information we can obtain from Unity's renderer:
We can actually get the depth of everything in our current game by turning on Unity's built-in Depth mode. Once this is turned on, we can use the depth information for a ton of different effects. Let's take a look at how this is done:
- Duplicate the sphere we created twice and create a plane underneath:
- Create a new shader by duplicating the ScreenGreyscale code by ...