orels-Unity-Shaders icon indicating copy to clipboard operation
orels-Unity-Shaders copied to clipboard

[ORL-63] Toon shader outlines w/o stencil

Open daalta opened this issue 6 months ago • 3 comments

The current toon shader uses stencils to achieve its stencil effects. This effect has benefits when dealing with transparency. But it's sometimes less effective at rendering concave outlines or outlines that intersect with the mesh.

I'd appreciate being able to choose between stencil-based outlines and "traditional" outlines.

Here's a comparison between orels's toon shader and Poyomi.

orels vs poyomi

Here's an example of outlines not being rendered in certain conditions:

outlines

From SyncLinear.com | ORL-63

daalta avatar Dec 17 '23 02:12 daalta

https://github.com/orels1/orels-Unity-Shaders/assets/3798928/62cc75e7-5af1-40d0-ae08-24ca88f0f06a

I think i got it working with a simple toggle

orels1 avatar Dec 24 '23 02:12 orels1

That would allow shapes that overlap each other to have stencils. I'll probably rename it to something more human readable

orels1 avatar Dec 24 '23 02:12 orels1

Added support for modifying outline width by vertex color. This will allow better artistic control

orels1 avatar Jan 07 '24 19:01 orels1