Category: shaders
-
Fire Shader
This fire shader has some good options to make it both stylized & normal fire. You can download the project here to play with it and make changes. Fire is quite an interesting thing in a game to add feeling. I was interested in making a fire shader since I saw a campfire in Commandos…
-
Ray Marching
Cover image credit: https://www.shadertoy.com/view/4slGD4 Ray marching is a method in which rays are started from camera into the game world. The ray keeps traveling forward in a loop, one step at a time, until it hits a surface. The surface here is not polygon, but a math function. This can work entirely in a fragment…
-
Dot Matrix Shader (LED Screen Effect)
It is a screen-space shader; we can replace the background black with some other color to simulate the tint & theme to make our scene more immersive. Shader breakdown: Godot Shader Code More Links
-
3D Grass Shader with Distortion & Wind
In a Nutshell Player interact distortion: Calculate a vector that points away from player position & assign it to the vertex. This will move the vertex away from player position. This is the core concept behind grass distortion due to player standing on it. (Yes, in reality, you’ll need to normalize this vector, and only apply…
-
Pixelization Shader
Pixelization shader can add a pixel art touch to your game, however it is not pixel art since there are many other things to consider when creating pixelart which pixelization shaders don’t’ do. In a nutshell It is a very simple shader. You need to round off the UVs in order to achieve the blocky…
-
Sea Sickness Shader (Underwater View Shader)
This is one of the simple screen space post processing shaders that you can apply to your game if you want to simulate sea sickness feeling or the feeling of being under the water. If you reduce the strength of the motion, you can apply it to our simple scene to simulate some motion instead…
-
3D Refraction Shader
After you have created vertex part of ocean shader using gerstner waves, you can make your ocean look more better by adding refraction effect for objects under the surface. Bird Eye’s View We need to sample screen texture with distorted UVs based on normals of object. Then we mix the screen texture color with object’s…
-
3D Ocean Shader Using Gerstner Waves
Sine wave displaces vertices up and down. Gerstner wave, in addition to this sine-based y-axis displacement, also does horizontal-axes displacement of vertices using same sine-wave. Imagine a surface made up of many points. Suppose we apply sine function like this:
-
Film Grain Shader
Film grain is one of the final effects that you apply to add a bit of stylized look or realism to your game. The slight imperfections it adds makes scene look more natural. How it works? Film grain is post processing screen space shader; which takes whole rendered scene as texture & applies grains to…