Coder Social home page Coder Social logo

urp_toon's Introduction

URP Toon Shader

Introduction

Simple toon shader in unity universal pipeline.

image-UnityChan

Genshin Impact Style(Model and Texture from miHoYo)

image-Genshin_Sample

Properties

SurfaceOptions

image-SurfaceOptions

Base

image-Base

Shadow

image-Shadow

ShadowType

DoubleShade

Adjustable two-layer shadow.(Reference UTS)

RampMapShadow

Shadows based on rampmap.

SDF_FaceShadow (Reference Genshin Impact)

Used for face shadow, sample a precomputed shadow mask to generate shadows. Limit:symmetrical face uv.

image-SDFMask

Need to add a script to the object, set the forward and left direction(ObjectSpace).

image-SDFScript

About how to generate sdf shadow mask. Node:Generate mask in r16 format(antialiasing).

https://zhuanlan.zhihu.com/p/389668800

SSAO (Add "ScreenSpaceAmbientOcclusion" RenderFeature)

Control SSAO strength.

CastHairShadowMask (Add "RenderFrontHairShadowMaskFeature" RenderFeature)

Cast a shadow mask in screen space for face shadow.(Check it on front hair material or something)

ReceiveHairShadowMask

Sample "CastHairShadowMask" for shadow.(Check it on face material)

Specular

image-Specular

Rim

image-Rim

  • RimBlendShadow

image-BlendRim

1:RimBlendShadow=0 2:RimBlendShadow=1 3:RimBlendShadow=1 RimFlip=1

  • RimFlip

Flip RimBlendShadow

Outline

image-Outline

AdvancedOptions

image-AdvancedOptions

Multi Pass Batch

In the default URP, if render multiple pass shaders(outline), the Rendering order like this:
Object1.Pass1-
Objcet1.Pass2-
Object2.Pass1-
Object2.Pass2......
image-BeforeBatch
It will stop SPRBatch.
image-NotSupportBatch
We can change the Rendering order like this by using RenderFeature:
Object1.Pass1-
Objcet2.Pass1-
Object1.Pass2-
Object2.Pass2......
image-AfterBatch

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

urp_toon's People

Contributors

chilimilk avatar xlive99 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

urp_toon's Issues

No outlines, even in sample scenes

Hi, I am once again asking for your technical support. I noticed I get no outlines (I checked the readme file). Outlines are not present is sample scenes too. Is there a way to fix it? I don't understand the point of the link in the readme, as it directs to a completely different project.

error CS0246: The type or namespace name 'UnsafeHashMap<,>' could not be found

Hi!
I love the shader but I am having an issue while compiling all the scripts. There is an error in ModelOutlineImporter.cs at multiple positions:

Assets\URPToon\ChiliMilkToonShader\Tool\JTRP\Editor\Import\ModelOutlineImporter.cs(18,32): error CS0246: The type or namespace name 'UnsafeHashMap<,>' could not be found (are you missing a using directive or an assembly reference?)

Did I do something wrong or is there some issue in the code that needs to be fixed?

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.