- Home /
Point lights can't cast shadows? Is forward rendering something that can be changed?
Hi there,
I'm testing the Pro Version of Unity and I was really disapointed to see that only directional lights can cast real-time shadows.
However, when you select shadows for a point light it says this isn't possible in forward rendering.... is this something that can be changed to allow shadows to be cast from a point/spot light?
Many thanks in advance.
C
Answer by maikkel · Oct 28, 2010 at 01:21 PM
You can change to Deferred Rendering via File->Build Settings...->Player Settings. In the Inspector, under "Per-Platform Settings" you can change the Rendering Path to "Deferred Lighting". This is a bit slower but lets you have Shadows for Point- and Spotlights. (i'm not sure, but i think this doesn't work for iPhone...)
Hope this helps!
Thought of course it also needs a higher $$anonymous$$imum spec gpu (shader model 3) and probably a more recent gpu's too accommodate the additional requirements - speculating here due to need for G-buffers etc. Which is one reason i'm unhappy that the old 2.6 rendering path was completely removed from U3.0
Answer by Waz · Apr 23, 2011 at 01:48 AM
Supposedly Forward rendering path now also supports shadows from all lights, by adding the fullforwardshadows paramater to the surface parameter (i.e. edit shader to add this).
#pragma surface surf Lambert fullforwardshadows
For some shaders (eg. Bumped), you may get an error about texture limitations. Fix this by preceding the above with:
#pragma target 3.0
There are still reports of problems with this... but that's for other questions.
Your answer
Follow this Question
Related Questions
Missing shadows on custom steppedAtten shader 0 Answers
Slower realtime shadow update speed? Possible? 1 Answer
Spot & point light dynamic shadows unity Pro 4 Answers
Strange shader/lightning behavior in generated mesh 2 Answers
[Android] Lights Issue 1 Answer