Grayscale screen based on health

I want to adjust the amount of grayscale applied on the camera based on the player’s health. For example, when the player is fully alive, the screen is like normal. When the player is dead, the whole screen is grayscale. When the player is half alive, the player’s screen displays some color and some grayscale, but the color is more faint.

Below are some pictures of the game Unturned which uses the same effects I described.

Thanks for your answers!

alt text

alt text

Use the free Unity post-processing stack asset (Unity Asset Store - The Best Assets for Game Making).

The color grading tool should let you change the camera’s color saturation at run-time. A saturation of 0 will lead to a grayscale image.