Semitransparent Shadows?

Hey, I noticed that with the new standard shader I can cast semitransparent shadows - which is amazing! That said, I'm trying to see if I can add this functionality to a custom alphablended surface shader (the end goal being a sort of faked lighting particle shader for smoke and such) but I'm having trouble understanding what's going on in the Universal shader.

Any pointers?

These shadows are a bit of a hack - it's more like "shadow dithering" based on alpha value, and only look okay-ish because shadows are later blurred.

In a custom shader, you'd have to write a manual ShadowCaster pass, with shader code similar to UnityUniversalShadow.cginc

I figured you were doing some kind of alpha-to-coverage-style hack :) As far as hacks go, it's pretty damn neat.
Just as a matter of curiousity, what about adding this as a pragma to surface shaders? Like there's the "alpha" keyword, maybe there could also be "alphaDitherShadows" or something.

On a side note, is it possible to modify the included Universal shader to add vertex color support? I think that would probably get me 90% of the way there.

"Not easily" I guess, but since you have the source...

OTOH, I'm working on making it possible to use Standard shaders' BRDF from surface shaders. Hopefully will land in one of these betas.

1 Like

I'm curious actually, I can't find this setting for the semitransparent shadows. Where is it? I've looked on the light, the material, the renderer, and the light, to no avail.

I'm loving the new standard shader, BTW. It's so easy to make objects that look really nice! :)

Aras, need to get you and Joen (Unlogick) together, so that the UMA (and other characters) skin shader can be sorted out and use the new standard shader's internal BRDF system.