Forward shadows issue in deferred renderer

Hi,

i’ve found a strange issue. So using realtime shadows in forward lighting, only the brightest (or most important) lights cast shadows. However, when modifying the shader, one can get all shadows casting light (i guess it’s the addshadow pragma adding the shadow passes) in forward rendering mode. But when i switch to deferred lighting, the renderer only casts shadows from the most important light again despite the fact, that i have whatever pragma in my shader. So question is, is this a known issue and/or does anybody know a way to fix this? Because there’s simply no way to get the same effects working completely in deferred mode right now and this issue basically makes the deferred renderer useless when trying to get more advanced effects than just simple blinn-phong or lambert lighting.

Greetz,
Chicken

In deferred rendering, all lights that have shadows should cast shadows. If you see it otherwise, it’s a bug; file a bug report with a small project that shows the issue.

The shader itself only has a forward lighting function, so it’s drawn in forward mode of course. But are the shadows done in screen space anyways? Because that would create an even stranger issue.

Ok, so the issue is that when you have a forward-only shader with full shadow support, and you’re rendering in deferred otherwise, that object only receives shadows from one light?

Looking at the code, I don’t think this should be happening. But if you see otherwise, can you file a bug with a small repro project?