orels1 / orels-Unity-Shaders

A collection of practical Unity shaders for your next project
https://shaders.orels.sh
Other
178 stars 15 forks source link

Add 2-Pass Transparency Toon shader #35

Closed orels1 closed 1 year ago

orels1 commented 1 year ago

2-Pass Transparency is very common in avatar shaders, since you often need to have something like semi-transparent hair together with outlines and other things.

Non-convex meshes are ill-suited for regular transparency as they will encounter sorting issues. Adding a separate pass that renders backfaces only allows you to separate the two and create a stable mesh that can act both as a transparent and an opaque object without issue