how do I use the shadow of an object in a real-time shader? both the shadow itself and the drop shadow?
to render on eevee ?
thanks
To get a 'drop shadow effect', you can enable and configure Ambient Occlusion in your render settings.
For fuuther control, the Shader to RGB
node will allow you to use the brightness of each texel as an input value for your shader magic.
If you want to customize the shadow cast by your Object on other objects, then you'll have to edit the materials for your other objects. You won't be able to differentiate which object cast this shadow without doing some very complicated view layer separation.
If you want to customize the shadow cast onto your Object, simply connect a 100% white Diffuse BSDF
into a Shader to RGB
. This will give you a mask of all the shadows and self shadows (incidence darkening)