A Lesson Plan for Learning Shaders (In Unity)

Michael Sanders
5 min readFeb 20, 2019

--

Shaders are powerful. And the resources out there to learn them are plentiful. But when you’re first entering the world of shaders, that bounty can lead to confusion. Where do you start? Which information is outdated? How do you test yourself on what you’ve learned?

It is relatively simple to google up an “Introduction to Shaders” article. There are great ones all over the internet. Hell, I’ve even written a series that can be used as an intro to shaders on this very website. The real problem shows up right after you finish that first article or series. Where do you go next? You don’t yet know what you don’t know.

Enter the Lesson Plan.

This isn’t exactly a novel concept. The universities have been doing it for at least the last 1160 years. Having one to help guide us through learning shaders in Unity will cut down our time to learn dramatically.

That’s what this article is. A first draft of a lesson plan for learning shaders in Unity. The series assumes no prior knowledge of shaders, although it does presume some basic experience with Unity.

The First Steps

Step 1) How I Got Started with Shaders (Non-Scary Shader Intro)

This article written by Minions Art, is the most gentle introduction to shaders I’ve ever encountered. It’s easy to follow and will give you immediate results. Even if you don’t follow any other steps in this lesson plan, this article alone will get you at least playing with and modifying a basic shader.

Step 2) A Gentle Introduction to Shaders in Unity3D

A second intro article, but whereas the first article glossed over a lot of finer details for the sake of getting you up and running with a shader as fast as possible, this article is going to get into the nitty gritty. Every bit of code that Unity adds to the shader for you will be explained as well as a high level overview of Unity’s render system.

There will be some redundant info here, but if this is your first concerted effort into learning shaders, that redundancy will work in your favor, both for comprehension and retention.

If Step 1 was the most important to get you up and running, this step is the most important to make sure you have the necessary background to keep running.

Step 3) Surface Shaders in Unity3D

For our third article, we’re going to stay with the amazing Alan Zucconi and do the second part of his shader intro series. This article will delve more into the Unity-specific “surface shaders” as well as lead you through some example shaders as he explains the concepts.

After making it through these three articles you have the beginnings of a strong foundation for shader development. If you’re still feeling like your comprehension for these beginning steps is a little shaky, that’s ok! Shader development is a very different way of thinking for a lot of developers and it takes time to understand it at an intuitive level.

For now, we’re going to move on to the next section. You can always come back to these first three articles after you’ve tried a few from the second section.

Optional Step

A lot of these shaders are going to rely on noise textures. For a bit of extra credit, you can go through this tutorial here by CatLikeCoding that goes through the process of creating perlin noise textures in Unity 3D. Or if you’d rather just jump into other parts of shader development, you can grab a pack of free noise textures here.

Choose Your Own Adventure

Now comes the fun part. You’re going to want to take a brief look through each of these tutorial lists and pick the shaders that sound the most exciting to you. Two of the authors you’ve already encountered. They are:

  1. Alan Zucconi
    The most technical on this list, Alan releases incredibly detailed and full featured tutorials that will take you through all the steps necessary to create the shader referenced. You’ll want to browse the list linked here for anything tagged “Unity” and “Shader.”
  2. Joyce [Minions Art]
    If anyone on this list is going to draw you in with pure artistic vision, it’s Joyce. The tutorials themselves come in a novel gif format that makes them easy to visualize. The text itself though can be sparse, so it can sometimes be best to use these as little mini tests of your acquired shader knowledge. The source code for all the effects are also available to donors on Joyce’s patreon.
  3. Dan Moran
    Another class act, Dan releases his tutorials in the form of video “case studies” where he breaks down effects from AAA games. Easy to follow, entertaining, and the source code for all the effects is available in the video’s description.

Example Lesson Plan

If looking through these lists is still a bit overwhelming, or you just want a more curated experience, here’s one possible path you could take to cover a wide variety of shader topics.

  1. How I Got Started with Shaders
  2. A Gentle Introduction to Shaders in Unity3D Part 1
  3. A Gentle Introduction to Shaders in Unity3D Part 2
  4. Basics of Image Effects Written
    An introduction to replacement shaders.
  5. Basics of Image Effects Video
    A second quick look at replacement shaders.
  6. Pokemon Battle Transitions
    Further exploration of full screen effects.
  7. Texture Based Dissolve
    Quick and dirty intro to discarding pixels.
  8. 3D Printer Effect Part 1
    Deeper dive into discarding pixels.
  9. 3D Printer Effect Part 2
    Continuation of the discarding pixels deep dive.
  10. Challenge: Toon Dissolve
    Test your knowledge on discarding pixels by recreating this shader.
  11. Intro to Vertex Manipulation
    A beginner’s intro to manipulating vertices in your shader.
  12. Vertex Manipulation for Tentacles
    Another Alan Zucconi special. We continue our exploration of the vertex portion of shaders by creating a shader for manipulating the “suckers” on a tentacle.
  13. Challenge: Moving Grass
    Take what you’ve learned about vertex manipulation and try and create this shader.
  14. Texture Distortion
    Jump in deep with CatLikeCoding’s Texture Distortion tutorial.
  15. Challenge: UV Distortion
    See if you can take what you learned in the last tutorial and create this UV distortion tutorial.

There you have it, the first revision of our Unity shader lesson plan. I may create an updated version of this list later on if people find this resource helpful. So please, if you do go through this list, send me some feedback! Let me know if you hit any snags or know of other resources that would fit well in this list.

--

--

Michael Sanders

Director of Interactive Development at Helios Interactive. And part-time Pirate.