• Stars
    star
    392
  • Rank 109,735 (Top 3 %)
  • Language ShaderLab
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 1 year 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#
483
star
2

unity-graphics

A collection of URP shaders and render features.
ShaderLab
42
star
3

di-framework

โ†— A Dependency Injection framework for Unity game engine.
C#
39
star
4

dx12-renderer

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

voxel-terrain

๐ŸงฑMinecraft-like voxel world made with Unity.
C#
23
star
6

unity-pcf-poisson

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

unity-generate-uml

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

computer-battle

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

ui-scaling-toolkit

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

leo-ecs-mirror-pong

An implementation of Pong using Mirror Networking and LeoECS Lite.
C#
6
star
11

malioc-unity

C#
6
star
12

unity-android-vibrations

Small performance-focused vibrations implementation for the Android platform.
C#
6
star
13

fp-roguelike

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

urp-toon-shader-cyberpunk-demo

A small scene showcasing some of the capabilities of URP Toon Shader.
5
star
15

raymarching-playground

A collection of Unity shaders implemented with raymarching.
GLSL
5
star
16

leo-ecs-extensions

Advanced Unity integration for LeoECS (Lite).
C#
4
star
17

cg-portfolio

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

vertex-ao

A proof of concept for a simple per-vertex ambient occlusion baking system.
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

gta-like-public

C#
1
star
24

unity-framework

C#
1
star
25

ui-framework

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

differential-equations

C#
1
star
27

di-systems

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

srp-demo

C#
1
star
29

persistence

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

srp-msaa-resolve-repro

C#
1
star