How would i go about adding cast shadows to a shader like this?



Working on a stylized game and we have set up a simple cell shader for the master material. We wanted to avoid using post processing based approaches cause we couldnt avoid shader noise. Is there any way for me to emulate cast shadows using normal lit materials? Alternatively is there some way for me to access info from the lighting buffers?

Deferred rendering means that lighting is deferred until after the rest of the pixel shading is done. In practice this means you cannot access light data in a standard material because it does not exist that early in the render pipeline.

This makes sense when you consider that certain things in the material can alter the appearance of a shadow, so they must wait until after materials are done to calculate properly.