• Stars
    star
    364
  • Rank 113,414 (Top 3 %)
  • Language ShaderLab
  • License
    MIT License
  • Created over 3 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌔 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 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

More Repositories

1

toon-rp

🌔 A Scriptable Render Pipeline (SRP) designed for toon/stylized visuals. Features custom lighting pipeline, multiple shadow algorithms, tiled lighting, Shader Graph support, and more.
C#
313
star
2

di-framework

↗ A Dependency Injection framework for Unity game engine.
C#
38
star
3

unity-graphics

A collection of URP shaders and render features.
ShaderLab
33
star
4

dx12-renderer

A DirectX 12 renderer featuring Deferred and Forward rendering paths, PBR, various post-processing effects, and more.
C++
20
star
5

voxel-terrain

🧱Minecraft-like voxel world made with Unity.
C#
19
star
6

unity-pcf-poisson

PCF (Percentage Closer Filtering) via Poisson sampling for Unity and Universal Render Pipeline.
ShaderLab
15
star
7

unity-generate-uml

A GitHub action that generates UML diagrams for Unity C# code automatically.
C#
10
star
8

computer-battle

A simple mobile game created with free assets only.
C#
8
star
9

ui-scaling-toolkit

A collection of components to ensure proper UI scaling for mobile devices.
ShaderLab
8
star
10

unity-android-vibrations

Small performance-focused vibrations implementation for the Android platform.
C#
5
star
11

urp-toon-shader-cyberpunk-demo

A small scene showcasing some of the capabilities of URP Toon Shader.
4
star
12

raymarching-playground

A collection of Unity shaders implemented with raymarching.
GLSL
4
star
13

leo-ecs-extensions

Advanced Unity integration for LeoECS (Lite).
C#
3
star
14

fp-roguelike

A mobile first-person roguelike game with turn-based combat and procedurally generated levels.
C#
3
star
15

cg-portfolio

A list of shaders/graphical effects I worked on.
2
star
16

leo-ecs-mirror-pong

An implementation of Pong using Mirror Networking and LeoECS Lite.
C#
2
star
17

vertex-ao

A proof of concept for a simple per-vertex ambient occlusion baking system.
C#
2
star
18

malioc-unity

C#
2
star
19

urp-toon-shader-custom

A collection of custom shaders made with URP Toon Shader.
ShaderLab
2
star
20

devops-2

HCL
1
star
21

opaque-texture-shaders

A collection of Unity shaders relying on Opaque Texture.
ShaderLab
1
star
22

leo-ecs-extensions-codegen

Source generators, analyzers, and code fixes for LeoECS Extensions.
C#
1
star
23

unity-framework

C#
1
star
24

ui-framework

A UI screen animation system for Unity.
C#
1
star
25

differential-equations

C#
1
star
26

di-systems

An extension to DI Framework that allows defining a specific order of execution for gameplay systems.
C#
1
star
27

srp-msaa-resolve-repro

C#
1
star
28

srp-demo

C#
1
star
29

persistence

A library for saving player's progress in Unity.
C#
1
star