[Asset] Occlusion shadow decal shader with depth fade

I made a decal shadow shader which should be good for character blob shadows or other uses.

Here I use it for a car drop shadow. I’ve seen similar effects in racing games. The shader works as is making a square or a circle, or like here with a texture.

It would likely look better with a proper texture (like based on baked AO) rather than the very simple one I have here.

I also use it to fill in areas if needed, if an object is dynamic or light baking (in this case APV) isn’t detailed enough.

With


Without

Using occlusion like this means it’s compatible with scene lighting.

Hope someone finds this useful!
DecalShadow.zip (11.3 KB)

3 Likes

I apologize I should have given this as a package file, this is a much cleaner version of the file.

DecalShadow.unitypackage (276.7 KB)

3 Likes

Hello buddy, Im not sure why but this is not working on my end. Tried it on Unity 6. Is there any specific setting that needs to be used/enabled?

you must have decals enabled in URP

Its is already enabled. Thats what was confusing me

it is also ambient occlusion, meaning it is masked by direct lighting. It effectively only works in shadowed areas.

You can post your use case and i might be able to be more specific.