1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
## Tooner
My toon shader for VRChat. I use this on my personal and commercial models.
It's semi optimized and a little scuffed.
Features:
* PBR
* Emissions
* Outlines
* With/without stenciling
* Glitter
* Explosion
* PBR detail maps x4
* Albedo, emission, normal, metallic, roughness, mask
* Decals x4
* Albedo, emission, angle
* Matcaps x2
* Add, mul, replace, sub, min, max
* Quantization
* Rim lighting x2
* Add, mul, replace, sub, min, max
* Glitter
* Quantization
* Rendering modes: opaque, cutout, fade, transparent, transclipping
* Culling modes: front, back, none
* OKLCH color adjustment
* Reflection probe (cubemap) override
* Lighting min/max
* Flat/realistic normals
* Geometry scroll (similar to Poiyomi's shatterwave)
* UV scroll
* Clones
* LTCGI
* Shadows (both casting and receiving)
* Gimmicks
* Vertex location quantization (object space)
* Vertex location scaling (object space)
Disclaimers:
1. This is a WIP.
2. I am not a graphics expert.
3. Stability is a non-goal. Keywords are likely to change in the interest of
performance and simplicity.
### Strawman FAQ
1. Why create another toon shader?
To deepen my understanding of lighting and to have a "simple" foundation on
top of which to create bespoke shader effects. lilToon and Poiyomi are both way
too fucking huge and complicated to fit my needs.
2. Does it work?
I think so?
3. Is it optimized?
Sort of.
I use static keywords on every feature, so you don't pay for anything you don't
use. I use branchless programming wherever appropriate. Dynamic branches are
only used where I either know they won't cause thread divergence, or where they
can't be avoided.
I'd like to strike a balance between performance and readability. Since it's
mostly for *my* use, I don't feel a need to make it totally optimal.
4. Demos?
This avatar uses it: [gumroad](https://yumfood.gumroad.com/l/lychee).
I'm working on a world but haven't published yet.
Will update this section with real demos later.
|