Suggestion for how to deal with lighting and shader problem.

So I’ve run into a dilemma.

The shaders I created do not work with deferred render at all (using the shaders is a must). But in forward rendering, no lights except 1 directional light cast any shadows.

So how in the world do you bake lightmaps with shadows in them in forward rendering, if no lights except 1 directional light casts a shadow. 1 directional light is totally fine for an open outdoor scene, but what the hell do you do for an indoor/enclosed scene?

Am I missing something here? Why is it so limited?

And whats the work around?

I also forgot to add that adding the pragma of fullforwardshadows didnt do anything.

The “1 directional light” is for dynamic shadows only; lightmapped shadows should be able to handle any number of lights. In the lightmapping window, make sure all the lights have lightmapping: auto selected. If you want both lightmap and the single realtime shadow at the same time, you need to select “Dual Lightmaps” and check “Use In Forward Rendering”.

But how would you adjust the shadows in forward rendering if you cant even see a preview of what they look like, to make sure they bake in the lightmap correctly?

Well, there’s not a good way to see all the shadows in realtime when you adjust lights (if there was, we wouldn’t need lightmaps). But you can set all of your lights to Lightmapping → Baked Only, and then go to an individual light and change it temporarily to Lightmapping → Realtime Only to get the shadow to show up and move it around there. But you can only do one shadow at a time unfortunately. You can also temporarily set all your lightmap settings to very low resolution so that bake times are faster, and do “Bake Selected” to quickly see what sections of the level will look like without having to bake the whole thing. Or you could try turning on Deferred Mode while editing to see the shadows even if it makes your shaders wonky, and then switch back to Forward when building the actual game. Those are all the tips I know; maybe someone more knowledgable with lightmapping has better ideas.