Unity: Adding Post- Processing Effects
Today I added in more effects to the player and Post Processing effects to our game. The player now has visuals when the player is damaged as well as an explosion effect when the player is slain.
Here are gifs to compare the game with and without post processing effects.


I decided on making the lighting more dramatic by creating more contrast between light and shadow (high noon lighting).

Unity now has a built in post processing package that every user has access to.
You can get post processing effects into your game by clicking on window then selecting package manager

The Package Manager window will then pop up on screen. Locate Post Processing in the list and click on install.
The install button will be located where the grayed out,’up to date’ button is. Mine appears this way because I already have post processing installed.

Once installed, we’ll create a game object called,’Post Processing Volume’.

We then add a post processing volume component to the game object. This will allow us to adjust the various effects that we can add to our game. Effects such as Bloom, Ambient Occlusion, Color Grading, and much more.

Before we dive in our post processing volume, we must go to our camera and give it a post process layer component. Our game will not render our post processing effects without the post processing layer component.

We ensure that trigger has the main camera attached to it.


and we create a new layer called,’Post processing’ and insert it within our component.

we can now go back into our post processing volume game object and adjust our effects. We can add effects by simply clicking ,’add effect’ then adjusting its sliders to our desired look.,

In addition to post processing, our player now has visuals displayed when the player is damage and a little thruster behind our player ship.

To create this effect, I drag my sprites into the scene view and rename it to Right engine. This will quickly create a usable game object. I then create a duplicate of ,’Right Engine’ and rename it to ,’Left Engine’.
These sprites are then animated and sized down appropriately.
I then disable these game objects so that they’ll only appear when the player is damaged.

I first declare three game object variables that we can refer to and assign them via inspector. As the names implies, Right engine game object will be assigned our right engine game object etc etc.
I then create a switch state underneath where our player has its health subtracted. This switch statement will test the PlayerHealth variable between 3 cases from 0 to 2. This switch statement will enabled the disabled damage visuals if the criteria is met. When Playerhealth is 0 our switch case 0 will instantiate an explosion. The same explosion from our asteroid.