There are many reasons why people play games. Some prefer gameplay focused action, while others value narrative experience above everything. No matter the type you are, we generally want our games to look appealing. In this post I, Vladyslav Michurin, want to discuss what shaders I used and how I developed them to achieve the current look of the game.
Pixelization
Pixelization, was the first shader made for “Trial of Sacrifice“. The ideal behind pixelization is to first downscale the image(reduce resolution) and then stretch the resulting image to its original size. Because lower resolutions have less pixels, the individual pixels become more accentuated. Unity has a built- in tool to work with shaders called “Shader Graph“. The problem however was that at the time of making this shader I didn't know how to access the camera BlitSource. BlitSource is essentially a color of pixel at specific UV coordinates. Thus I had to do it using Unity Scriptable Render Pipeline(SRP). Luckily after watching many tutorials I finally was able to create the first shader for the game.


Cel Shaded Material
Although I liked the result produced by pixel shader, it wasn’t ideal. After looking into the issue for some time, I understood what was the problem. You see, even though the image pixelization was working perfectly, the shadows had too much of a gradient. This resulted in them looking mushy instead of realistic. My way of fixing it was to create a cel shaded material, which reduces the amount of shadows . The way it works is it checks what amount of light the pixel receives and then puts it into the corresponding shadow level. All pixels at that level are then set to use the same amount of light per pixel. For example if the number of shadows is set to 2, then pixels are divided into 3 levels. Pixels that have a light level between 1 and 0.67 are set to use a light value of 1. Pixels between light levels of 0.66 and 0.34 are set to use a light value of 0.5. All other pixels have a light value set to 0, meaning they act as if they are in complete shadow.


Color Quantization and Dithering
Changing the material on all of our models to Cel Shaded Material helped us to make better looking shadows. Now the result was satisfactory, however in my search to improve the overall look of the game I stumbled on a channel named Acerola (https://www.youtube.com/@Acerola_t). There I found an explanation of 2 effects that allowed me to dramatically improve the game's visual - Quantization and Dithering. Color Quantization is intentional reduction of available colors. This results in less gradient and colors looking more “crisp“, helping to accentuate individual pixels.
Dithering is an intentionally applied form of noise. It is used to fake gradients between colors.
In the image above, you can see a grayscale image, being converted to black and white using dithering. There the density of black pixels roughly corresponds to the amount of “greyness“. When combined together, they create stunning visuals.




Sharpness
The final shader that had a huge effect on the game was Sharpness Shader. It essentially takes the edges and increases the difference between them and pixed nearby. This makes the image more crisp.


End Result With Comparisons



