All Projects → ChiliMilk → Urp_toon

ChiliMilk / Urp_toon

Licence: mit
A Toon Shader in Unity Universal Render Pipeline.

Projects that are alternatives of or similar to Urp toon

Gpu Planetary Rendering
GPU atmosphertic scattering and planet generation in Unity 3D
Stars: ✭ 92 (-37.41%)
Mutual labels:  unity, shader
Proccharvfx
Procedural character generation with Unity Shader Graph and VFX Graph
Stars: ✭ 114 (-22.45%)
Mutual labels:  unity, shader
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+1238.78%)
Mutual labels:  unity, shader
Temporalreprojectionexample
Temporal reprojection example for Unity
Stars: ✭ 82 (-44.22%)
Mutual labels:  unity, shader
Unityurp Billboardlensflareshader
(1)Add a new Quad GameObject (2)Use this shader (3)Done! Now you have billboard lens flare shader for URP!
Stars: ✭ 140 (-4.76%)
Mutual labels:  unity, shader
Adamplanereflection
Planar reflection effect from the Adam Interior Environment package.
Stars: ✭ 86 (-41.5%)
Mutual labels:  unity, shader
Unlitclouds
A unity cloud shader, using vertex colors and tessellation for a simple stylized look.
Stars: ✭ 110 (-25.17%)
Mutual labels:  unity, shader
Drawmeshwithmotionvectors
An example showing how to generate per-object motion vectors when using DrawMesh.
Stars: ✭ 65 (-55.78%)
Mutual labels:  unity, shader
Kinostreak
Anamorphic lens flare effect for Unity
Stars: ✭ 139 (-5.44%)
Mutual labels:  unity, shader
Unity Raymarching Framework
A framework to easy implement raymarching in unity. Include lots of hash,noise,fbm,SDF,rotate functions
Stars: ✭ 129 (-12.24%)
Mutual labels:  unity, shader
Ushadertemplate
Unity editor extension to generate shaders from template files.
Stars: ✭ 78 (-46.94%)
Mutual labels:  unity, shader
Noiseball3
A Unity example that shows how to use the new implementation of DrawProcedural.
Stars: ✭ 147 (+0%)
Mutual labels:  unity, shader
Pbr proj
Shader of PBR for Unity
Stars: ✭ 68 (-53.74%)
Mutual labels:  unity, shader
Spriteglow
A sprite glow effect for Unity game engine
Stars: ✭ 1,287 (+775.51%)
Mutual labels:  unity, shader
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+7857.82%)
Mutual labels:  unity, shader
2d Unity Experiments
A collection of visual Unity experiments with latest packages (URP, Shader Graph, Cinemachine, etc).
Stars: ✭ 107 (-27.21%)
Mutual labels:  unity, shader
Nnao
Neural Network Ambien Occlusion based on http://theorangeduck.com/page/neural-network-ambient-occlusion
Stars: ✭ 57 (-61.22%)
Mutual labels:  unity, shader
Uchromakey
Chroma key shader asset for Unity
Stars: ✭ 58 (-60.54%)
Mutual labels:  unity, shader
Lwrpshaders
A collection of high customizable unlit shaders for Lightweight Render Pipeline
Stars: ✭ 125 (-14.97%)
Mutual labels:  unity, shader
Unityraytracinggem
💎 Ray tracing gem shader for Unity
Stars: ✭ 140 (-4.76%)
Mutual labels:  unity, shader

URP Toon Shader

Introduction

基于URP的通用卡通着色器,使用URP标准的PBR模型(Minimalist CookTorrance BRDF)进行改造,纯代码实现,没有使用ShaderGraph,兼容SPR Batch.
Universal Toon shader based on URP , use PBR lighting(Minimalist CookTorrance BRDF) in URP,use code without ShaderGraph,SPR Batch Compatible.

  • Unity 2020.2.0+、URP 10.2.2+

image-UnityChan

Properties

SurfaceOptions

image-SurfaceOptions

  • Workflow Mode : Specular or Metallic
  • SurfaceType : Opaque or Transparent
  • Render Face : Front Back Both (For Forward Pass)
  • Alpha Clipping : ClipMask(裁剪遮罩),Threshold(阈值)
  • Stencil : 模板测试,用于实现眼睛的遮挡效果,参考UTS(Stencil Test,used to achieve transparent effects for toon eyes,reference from UTS)
  • Stencil Type : Mask-写入缓冲的物体,渲染队列要比Out优先(Things that want to write to the buffer,Render Queue Less than "Out"):
    Stencil {
    Ref[_StencilChannel]
    Comp Always
    Pass Replace
    Fail Replace
    }
    Out-从缓冲读取的物体(Read from the buffer)
    Stencil {
    Ref[_StencilChannel]
    Comp NotEqual
    Pass Keep
    Fail Keep
    }
    Stencil Channel : 1-255

Base

image-Base

Shadow

image-Shadow

  • UseRampMapShadow : 使用RampMap控制阴影衰减。
  • VOffset : RampMap采样的V坐标
  • Shadow1Color :第一层阴影颜色
  • Shadow2Color :第二层阴影颜色
  • Shadow1Step : 第一层阴影阈值
  • Shadow1Feather : 第一层阴影羽化值
  • Shadow2Step : 第二层阴影阈值
  • Shadow2Feather : 第二层阴影羽化值
  • EnableInShadowMap : 固定阴影贴图
  • Receive Shadow : 接收阴影(ShadowCoord)

Specular

image-Specular

  • Specular
  • SpecularStep : 高光阈值
  • SpecularFeather : 高光羽化
  • Smoothness : 光滑度
  • HairSpecular : 各向异性头发高光
  • HairShiftMap : 切线偏移图、偏移强度
  • SpecularShift : 第一层高光偏移量
  • SpecularShiftSec : 第二层高光偏移量
  • SpecularSecMul : 第二层高光强度(*Specular)
  • EnablesSpecularHighlights : 是否使用高光

Rim

image-Rim

  • EnbleRim :启用边缘光
  • BlendRim : 颜色插值
  • RimColor
  • RimPower : 强度
  • RimStep
  • RimFeather

Outline

image-Outline

AdvancedOptions

image-AdvancedOptions

  • Environment Reflections : 是否接收反射
  • Enable GPU Instancing : 使用GPU Instancing合批
  • RenderQueue : 渲染队列

Multi Pass Batch

In the default URP, if render multiple pass shaders, the Rendering order like this:
Object1.Pass1-
Objcet1.Pass2-
Object2.Pass1-
Object2.Pass2......
image-BeforeBatch
This will stop SPRBatch.
image-NotSupportBatch
Use ComstomRenderer,the Rendering order like this:
Object1.Pass1-
Objcet2.Pass1-
Object1.Pass2-
Object2.Pass2......
image-AfterBatch

How to Set project:

1.Create CustomForwardRenderer Asset.
Assets/Create/Rendering/Universal Render Pipeline/ToonForward Renderer

2.Setup Pipeline Asset
image-Setup

Node1 : Use Assembly Definition Reference to access urp package.
Node2 : SRP Batch does not support Skin Mesh yet.

Reference

https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project
https://github.com/Jason-Ma-233/JasonMaToonRenderPipeline
https://github.com/you-ri/LiliumToonGraph
https://github.com/Kink3d/kShading
https://unity.cn/projects/china-unity-tech-week_linruofeng

Licenses

MIT

"Assets/UnityChan/License"

© Unity Technologies Japan/UCL

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].