Catlike Coding

C# and Shader Tutorials

for the Unity Engine

These tutorials teach you about C# and shader programming for Unity. They build on one another, introducing new programming concepts, math, algorithms, and Unity features. They're useful to both novice and experienced developers.

One of many things you can make with Unity.

Become My Patron

Your support makes these tutorials possible! If you like them and want to see more, please become my patron, via Patreon. You can also make a one-time donation.

  1. Become My Patron


There are multiple tutorial sections. You don't need to work through these sequentially, but some do build on each others. The Basics section lays the foundation for working with Unity and C# programming. The Rendering section covers the fundamentals of shader programming, followed by the Advanced Rendering tutorials.

Some tutorials are quite old. You will recognize them, because they have an obviously older layout. Other tutorials are newer, but were made with Unity 5. I'm working my way through upgrading them. The newer tutorials mention what version they have been made with.


These tutorials provide an introduction to working with C# in Unity.

  1. Game Objects and Scripts
  2. Building a Graph
  3. Mathematical Surfaces
  4. Constructing a Fractal
  5. Frames Per Second


A series about controlling the movement of a character.

  1. Sliding a Sphere
  2. Physics
  3. Surface Contact

Object Management

A series of tutorials that deal with creating, keeping track of, saving, and loading objects.

  1. Persisting Objects
  2. Object Variety
  3. Reusing Objects
  4. Multiple Scenes
  5. Spawn Zones
  6. More Game State
  7. Configuring Shapes
  8. More Factories
  9. Shape Behavior
  10. Satellites
  11. Lifecycle
  12. More Complex Levels

Tower Defense

A series about creating a simple grid-based tower defense game.

  1. The Board
  2. Enemies
  3. Towers
  4. Ballistics
  5. Scenarios
  6. Animation


A collection of tutorials that cover the creation of flow effects, like water surfaces.

  1. Texture Distortion
  2. Directional Flow
  3. Waves
  4. Looking Through Water

Mesh Basics

An introduction to procedural meshes. From a simple grid to deformable balls.

  1. Procedural Grid
  2. Rounded Cube
  3. Cube Sphere
  4. Mesh Deformation

Custom SRP

A collection of tutorials about creating a custom scriptable render pipeline in Unity. For Unity 2019 and later.

  1. Custom Render Pipeline
  2. Draw Calls
  3. Directional Lights
  4. Directional Shadows

Scriptable Render Pipeline

A collection of tutorials that cover the scriptable render pipeline. For Unity 2018.

  1. Custom Pipeline
  2. Custom Shaders
  3. Lights
  4. Spotlight Shadows
  5. Directional Shadows
  6. Transparency
  7. Reflections
  8. Global Illumination
  9. Baked Shadows
  10. Level of Detail
  11. Post-Processing
  12. Image Quality


A series about understanding Unity's default rendering pipeline. How a mesh turns into pixels that look like real objects.

  1. Matrices
  2. Shader Fundamentals
  3. Combining Textures
  4. The First Light
  5. Multiple Lights
  6. Bumpiness
  7. Shadows
  8. Reflections
  9. Complex Materials
  10. More Complexity
  11. Transparency
  12. Semitransparent Shadows
  13. Deferred Shading
  14. Fog
  15. Deferred Lights
  16. Static Lighting
  17. Mixed Lighting
  18. Realtime GI and LOD Groups
  19. GPU Instancing
  20. Parallax

Advanced Rendering

These are tutorials covering more complex or specialized rendering techniques, going beyond Unity's standard shaders. They build on the work done in the Rendering series.

  1. Flat and Wireframe Shading
  2. Tessellation
  3. Surface Displacement
  4. Bloom
  5. Depth of Field
  6. FXAA
  7. Triplanar Mapping

Hex Map

A series about hexagon maps. Lots of strategy games use them.

  1. Creating a Hexagonal Grid
  2. Blending Cell Colors
  3. Elevation and Terraces
  4. Irregularity
  5. Larger Maps
  6. Rivers
  7. Roads
  8. Water
  9. Terrain Features
  10. Walls
  11. More Features
  12. Saving and Loading
  13. Managing Maps
  14. Terrain Textures
  15. Distances
  16. Pathfinding
  17. Limited Movement
  18. Units
  19. Animating Movement
  20. Fog of War
  21. Exploration
  22. Advanced Vision
  23. Generating Land
  24. Regions and Erosion
  25. Water Cycle
  26. Biomes and Rivers
  27. Wrapping


Procedural noise is useful for lots of things. This series shows how to make your own value, Perlin, and simplex noise, including their derivatives.

  1. Noise
  2. Noise Derivatives
  3. Simplex Noise

Marching Squares

A series about drawing and reconstructing shapes using a 2D grid. Why not Marching Cubes? Because the concepts are the same for both 2D and 3D, and dealing with two dimensions is already complex enough.

  1. Partitioning Space
  2. Sharing and Crossing
  3. Staying Sharp
  4. Erecting Walls
  5. Being Colorful


Tutorials that can be considered small games.

  1. Swirly Pipe
  2. Maze

Older Tutorials

These tutorials are very old. They work for Unity 4 but haven't been updated for later versions. They might still have value, but you'll have to make adjustments yourself. The exception is Curves and Splines. I will upgrade that tutorial after I finish upgrading the Basics series.

  1. Curves and Splines
  2. Runner
  3. Octahedron Sphere
  4. Custom Data
  5. Custom List
  6. Star

Questions & Answers

Have a question? Here are a few common ones. Click or touch the questions to see the answers. You can also contact me in various ways.