Hey y’all! We’re going to learn about several different shader techniques in this tutorial. The distortion effect in particular was covered in the ice tutorial, but we’re going to re-learn it here in a new light.
Basically, this heat distortion shader was achieved by creating a flat plane mesh and applying a material with a shader that does the following:
- Billboard the plane to the camera view & draw it on top of everything
- Grab the camera’s rendered texture
- Distort the texture sample position
- Use the distorted position to sample & draw the camera texture
For your reference, here’s the final code for the distortion fire shader.
Let’s jump right in!