Unity Courses Shader Stories: Colour Gradients
Unity

Shader Stories: Colour Gradients

Build smooth two-colour and three-colour gradient shaders in Unity, with the maths broken down step by step.

2 chapters · 13m Intermediate Updated 23 Apr 2023 Phil · @FirnoxGames
Free

Free for everyone. No account needed.

Start watching →

What you'll learn

1 Two-colour gradient ▶ 5 min

In this tutorial we will show you how to create a two-color gradient in shader code, without requiring textures.

In this chapter
  1. Introduction and setup
  2. Shader code
  3. UV recap
  4. Animation script
2 Three-colour gradient ▶ 7 min

When two colours just don't cut it, we present here a 3-colour gradient shader for Unity.

In this chapter
  1. Introduction and setup
  2. Shader code
  3. Optimisation
Included with this course
Video walkthrough · 13m
</>Annotated source code ↗ · public domain