GithubHelp home page GithubHelp logo

delt06 / toon-rp Goto Github PK

View Code? Open in Web Editor NEW
389.0 15.0 21.0 32.97 MB

๐ŸŒ” A Scriptable Render Pipeline (SRP) designed for toon/stylized visuals. Features custom lighting pipeline, multiple shadow algorithms, tiled lighting, Shader Graph support, and more.

License: MIT License

C# 74.06% HLSL 17.63% ShaderLab 7.54% GLSL 0.77%
cel-shading render-pipeline shader shaders shading srp stylized toon toon-shading unity

toon-rp's Introduction

Toon Render Pipeline (Unity SRP)

GitHub release (latest SemVer including pre-releases) GitHub license

A Scriptable Render Pipeline (SRP) designed specifically for toon/stylized visuals.

๐Ÿšง The project is in its early stages and has not been tested in production.

โš ๏ธ The project only supports Linear color space.

Main

Unity Version

๐Ÿ”จ Developed and verified with Unity 2022.3.12f1 LTS and Core RP Library v14.0.9.

Verified Platforms

  • Windows (DirectX 11, DirectX 12, Vulkan, OpenGL)
  • Android (OpenGL ES 3.0+, Vulkan)
  • WebGL 2.0
  • XR (see XR Wiki page for full info)

โš ๏ธ Other platforms may work but have not been tested yet.

Table of Contents

Features

See the project Wiki for the full feature list.

Ramp Ramp Texture

  • Shadows: multiple options for soft shadows and stylization.
Crisp Shadows Soft Shadows Blob Shadows
Shadows VSM Shadows Blob Shadows

Tiled Lighting

Shader Graph

Screen-Space Outlines Inverted HullOutlines

  • Stylized post-processing effects: bloom, SSAO, etc.

Bloom SSAO

Installation

๐Ÿ“ Note: to install the package for an older Unity version, refer to the Installation page.

1. Add the package

Option 1

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

Option 2

Add the following line to Packages/manifest.json:

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

2. Create a pipeline asset

Inside the Project window, right click and select Create/Rendering/Toon Render Pipeline Asset.

3. Set the pipeline asset

Go to Edit/Project Settings/Graphics and set the field Scriptable Render Pipeline Settings with the newly created pipeline asset.

References

Used Assets

toon-rp's People

Contributors

delt06 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toon-rp's Issues

Extension mechanism

Add an ability for extending the renderer at different points in its pipeline.

  • Post-processing
  • Other stages
    • Convert Inverted Hull Outlines
    • Convert SSAO

Shader Graph support

  • Unlit
  • Default
    • Shadows
    • Blob Shadows (general keyword and receive tickbox)
    • Additional Lighting: Vertex
    • Additional Lighting: Pixel
    • Additional Lighting: Pixel Tiled Lighting
    • Global vs override ramp
    • Toggle Specular and Rim
    • Toggle Environment Lighting
    • Toggle Fog
    • Outlines Stencil
    • Emission
    • SSAO
  • ParticlesUnlit
    • Quad Preview
    • Soft Particles
  • Move matcaps to a shader graph
  • Material Override - moved to #138
  • Queue Offset and Queue Control
  • Receive Shadows Off (TODO) - implemented
  • Check the need for ComputeMaterialNeedsUpdateHash (TODO) - removed
  • Test on Android
  • Test all GAPIs
  • Wiki page
    • 3 targets, all their parameters and blocks
    • Built-in nodes: matcaps

Screen-Space Outlines

Implement outlines as a post-processing effect. Make sure to implement fog support.

First feature set

  • Basic Toon Shader with Global Ramp
  • Crisp Anti-Aliased Ramp
  • Variance Shadow Mapping
  • MSAA
  • VSM Blur: add a multi-compile option for simpler blur
  • Fix preview lighting
  • Change _buffer.SetGlobalVector(DirectionalLightColorId, Vector4.one); back to zero
  • Shadows: normals bias
  • Crisp AA for shadows
  • HDR
  • Bloom
  • Stylized Bloom
  • Outline (inverted hull)
  • Custom normals for the inverted hull outlines
  • SSAO
  • Stylized SSAO (cross-hatching)
  • fog: both for forward and inverted hull outline
  • MSAA: depth "resolve" via a depth-only pass
  • Optimize shadow coords computation (bake transformations into the matrix)

Non-matching Profiler.EndSample

Appeared in debug build:

Non-matching Profiler.EndSample (Every EndSample call must have a preceding BeginSample call within the same frame): Default
Previous 5 samples:
	Outline (Inverted Hull)
	GfxDeviceD3D12Base
	Default
	Outline (Inverted Hull)
	Clear Render Targets
In the scope:
	Outline (Inverted Hull)
	Main Camera
	Render Thread

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.