I made the shadow of Solider in my game using Unity pro shadows feature.


The performance of my game becomes very slow after adding these shadows. I used light map for buildings shadows but I cant use this thing for solider. I want to ask what technique should I use to make both real and optimize shadow of my solider.

  • \$\begingroup\$ have you tried to play with different settings (resolution, number of lights )? I think it's there in the documentation. \$\endgroup\$
    – concept3d
    Nov 6, 2013 at 9:27
  • \$\begingroup\$ @concept3d yes I tried but there is no better luck. \$\endgroup\$ Nov 6, 2013 at 9:56
  • \$\begingroup\$ maybe posting a picture, or describing what are you trying to render in more detail can make other people help you. \$\endgroup\$
    – concept3d
    Nov 6, 2013 at 10:31
  • \$\begingroup\$ ok . will add soon. \$\endgroup\$ Nov 6, 2013 at 10:32

1 Answer 1


There are a few things you should do to optimise the shadows in your game:

Use lightmapping heavily to compute the shadows for static meshes. Unity has a builtin lightmapper. See http://docs.unity3d.com/Documentation/Manual/Lightmapping.html and http://docs.unity3d.com/Documentation/Manual/OptimizeForIntegratedCards.html.

The computation of dynamic lights have 3 main aspects and each one must be tweaked for performance: the light itself, the casters and the receivers.

To make a dynamic light, set Hard Shadows or Soft Shadows in it. However, the number of dynamic lights should be minimal since each one issue additional rendering for shadow projection. Also, Soft Shadows require a blur filter to ensure smoothness, which can impact the performance. Finally, the resolution of the shadow texture also affects performance. See http://docs.unity3d.com/Documentation/Manual/Shadows.html and http://docs.unity3d.com/Documentation/Manual/DirectionalShadowDetails.html.

To make a mesh receive or cast shadows, set Receive Shadows or Cast Shadows in the respective Renderer (BEWARE: by default these settings are on). However, the number of casters and receivers should also be minimal, since each caster or receiver in the "light frustum" must be rendered additional times. See http://docs.unity3d.com/Documentation/Manual/ShadowTroubleshooting.html.

Another related performance tweek is to use the Deferred Rendering Path instead of the Forward Rendering Path.

In summary:

  1. Bake light maps;
  2. Keep the number of dynamic lights to a minimum;
  3. Tweak the resolution of the shadow texture;
  4. Tweak the filter for Soft Shadows;
  5. Use Receive Shadows and Cast Shadows judiciously;
  6. Use the Deferred Rendering Path.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .