I am a big fan of this Unity Chan Toon Shader here: GitHub - unity3d-jp/UnityChanToonShaderVer2_Project: UnityChanToonShaderVer2 Project / v.2.0.9 Release
I am developing a VR anime visual novel, and I would like dither transparency to be supported so I can fade in and out characters between poses. Dither transparency is not supported in the Unity Chan Toon Shader.
Here is an example of what I mean:

Has anyone done this before, and does anyone know how to?
Cheers
dithered transparency can be achieved in a couple ways, but i figure since it’s a visual novel the best way would be screen space dithering. you must read your dithering texture at the same pixel density as the screen, but you first have to get the uv in the vertex function and pass it to the fragment.
do this step AFTER the pixel has been converted to clip space. if you’re not sure, just do it at the end.
//compute screen space uv's and store them
o.screen = ComputeScreenPos(o.pos).xyw; // you'll need to make your own interpolator (o.screen)
now, we’re in the fragment function. this is the math i use to read the texture in pixel size. you can replace 32 with _DitherTex_TexelSize.zw if you want to use other sizes, but i hardcoded it for neglible performance gains.
//calculate screenspace uv for dither
float2 screenPos = (i.screen.xy / i.screen.z) * _ScreenParams.xy / 32;
float screenDither = tex2D(_DitherTex, screenPos).x;
finally, the fading. the function clip() removes any pixel with a value below 0. you can clip however you like, but since it’s for a transition i think squaring your fade may look nice.
//clip any value below 0,
//you may have to increase the range of _Clip depending on texture's brightness
clip(.5 - screenDither * _Clip); // when _Clip is 0, the model is opaque, at 1 it is invisible
report back with any questions! i love dithering. also, unity chan’s shader might have o.vertex instead of o.pos, i just don’t know which branch of that unity chan repo to even look at lol.
