urp-toon-shader icon indicating copy to clipboard operation
urp-toon-shader copied to clipboard

🌔 Toon shader for Unity's Universal Render Pipeline.

Toon Shader for Unity URP

A toon shader compatible with the Universal Render Pipeline.

Unity Version

Developed and verified with Unity 2021.3.0f1 LTS and URP package v12.1.6.

Main

Table of Contents

  • Toon Shader Capabilities
  • Toon Shader (Lite) Capabilities
  • Inverted Hull Outline
  • Installation
  • Getting Started
  • Documentation
  • Examples
  • Performance Benchmark
  • Used Assets

Toon Shader Capabilities

Toon Icon

Surface

  • Opaque/Transparent with blending modes:
    • Alpha/Premultiply/Additive/Multiply
  • Alpha Clipping
  • Culling
    • Back/Front/Off

Color

  • 2 or 3-step ramp with configurable thresholds and smoothness
  • Ramp textures
  • Normal Maps
  • Main light
  • Additional lights
    • per-vertex or per-pixel, depending on URP settings
    • optional specular highlights
    • shadows
  • Casting and receiving shadows
  • Configurable shadow color (both in multiplicative and "pure" modes)
  • Emission
  • Rim lighting (Fresnel effect) and specular highlights with HDR color support (e.g. for bloom)
  • Anisotropic specular (e.g. for hair)
  • Environment reflections and Reflection Probes
  • Fog
  • SSAO
  • Environment Lighting
  • Baked lights and shadows
    • Dynamically receive via light probes
    • Contribute to bake process ("meta" pass)
  • Vertex Color
  • Screen-Space Shadows

Performance

  • SRP Batcher compatibility
  • GPU Instancing

Only Forward rendering path is supported.

Toon Shader (Lite) Capabilities

Toon Lite Icon

Color

  • 2-step ramp with configurable threshold and smoothness
  • Main light (per-vertex or per-pixel)
  • Casting shadows
  • Configurable shadow color
  • Fog
  • Vertex Color

Performance

  • SRP Batcher compatibility
  • GPU Instancing

Only Forward rendering path is supported.

Inverted Hull Outline

A simple and performant outline shader. Renders outlines of objects on certain layers via a Renderer Feature.

Inverted Hull Outline

See the Outline Wiki page for details.

Installation

For the latest version (Unity compatibility is specified here):

Option 1

  • Open Package Manager through Window/Package Manager
  • Click "+" and choose "Add package from git URL..."
  • Insert the URL:
https://github.com/Delt06/urp-toon-shader.git?path=Packages/com.deltation.toon-shader

Option 2

Add the following line to Packages/manifest.json:

"com.deltation.toon-shader": "https://github.com/Delt06/urp-toon-shader.git?path=Packages/com.deltation.toon-shader",

Specific Unity Version

If you want to explicitly specify a Unity version, you should use a URL of the following form:

https://github.com/Delt06/urp-toon-shader.git?path=Packages/com.deltation.toon-shader#<UNITY-VERSION>

where <UNITY-VERSION> may be either of the following:

  • 2021.3
  • 2020.3

By default, the shader is updated only for LTS versions of Unity.

Getting Started

Documentation

Examples

Bundled
  • Forest Demo
  • Toony Tiny City Demo
  • Anime Character: Arisa
  • warrior
  • fur
Released Games

Used Assets