Real-Time game Shaders


















The fuel array system of Servoanuts was an immense challenge to overcome.
Not only did each fuel (Eight in total) need a distinct feel to it, but also needed a top material, a pipe material, and a tank material.
And the best thing about this whole array, is that it's all made into two base shaders! With no extra shader variants to compile!
Each 'fillable' fuel material has the ability to mix and swirl to a new colour, so our players could see in real-time when they combined fuel.
The fillable tanks were an easy part of the shader, the difficult part was that top texture. Making it feel like the tanks were truly filling up by using a screen position trick to project a mapped texture onto the back-faces of the other side of the tank.
The array itself is also very optimised, using a mathematical formula to check assigned material colour against the colour displayed. No branches or Booleans in these shaders, just an integer slider.
Some other environmental and mechanical shaders I made for Servonauts.
My favourite amoung these being the simple glitch shader of Astroil City's TV screens. This shader has a built in timing system that matches the glitch to when the image is changed.
One of the integrated parts of this shader was a secret angry image that shows up when you blow up a car in the level. So the shader had to be changed and added to allow the glitch to have an overwrite and timing for when players did things inside the level.




No one starts making shaders without making a few water shaders.
And while I do have a few, I'd highlight this one, that I made during a shader workshop I held for MAXART.
During the workshop I went over a lot of basic shader practices, and put them together to make a basic water shader that was beginner friendly.
A shader I made originally for the desert level of Servonauts became my white whale.
While I made a number of effects like quicksand, falling sand, and sand build up, the direction of the world changed to the viscous oil featured above.
Back when sand was the main aspect, we had ideas to have wind play a part in the hazards of the desert level.
So the sand shader has complete wind controls, including sand only building up in grooves that the wind would blow it in, and sand would fall more on the side that sand was blowing towards.


Some other general shaders I made included screen effects.
I made a few outline shaders, using Sobel, the difference of gaussian and the hull method.
I really enjoyed these more technical shaders, and having the goal of needing them for certain projects pushed me into making quite a few effects.
Featured are a Sobel outline shader, a fog shader that matches your skybox, and the comic book pass I made for the Servonauts Intro cinematic.


