<aside> đź’ˇ Prior to version 1.20, to have materials using non-ASP shaders receive character shadows (i.e., sample the ASP shadow map), you had to manually modify the code within each shader. For detailed instructions, please refer to point 2 on this page.

Starting with version 1.20, the ASP shadow map renderer feature includes an option for Screen Space Shadow. With this feature, you can easily display character shadows on other materials with a single click, (also completely avoiding self-shadowing on the characters). This is a more convenient option for those who cannot manually modify shader code.

</aside>

{63B1D37E-3ED2-49D4-8FF6-527978C3BA4A}.png

The image above illustrates an example where character shadows are not displayed correctly (It should be sampled from the ASP Shadow Map and display on the surface).

The reason for this issue is that the Terrain material beneath the character uses the Terrain/Lit shader, which does not sample the ASP Shadow Map by default. You can display character shadows on terrain surface by using [Method 1] or [Method 2] outlined below.

Method 1 - Use the Screen Space Shadow feature in the ASP Shadow Map → for users who prefer not to modify the shader code.


{001C8A1A-7CD6-4EAC-AF63-EED040F133BC}.png

{4F5F73E9-3F65-47DC-869C-C534AE6FD9E0}.png

{62B466E8-8C72-4CD9-9D32-7A9B9061E0F0}.png

After enabled  Use Screen Space Shadow Pass, the character-only shadow now display on terrain surface.

<aside> 💡 The advantage of using screen space shadows is that you don't need to manually modify other shaders. However, the downside is that the shadow colors WILL differ from those of other PBR materials. This is because when rendering screen space shadows onto the scene, we don’t have surface information such as roughness/metallic —the color of the shadow is simply the alpha blending result of the current frame color.

Nonetheless, this approach is usually acceptable for highly stylized, anime-style games.

</aside>

Make sure that Hidden/ASP/ScreenSpaceShadows is included in your Always Included Shaders under ProjectSettings. Otherwise the effect will not packed into your builds.

This should setup automatically once you open the ASP shadow map renderer feature in inspector.

{8D4EBCED-2F6C-4FBF-BF8F-CF893BB6C8FF}.png

Method 2 – Manually Sample the ASP Shadow Map in Your Shader Code → Ideal for users who want complete control over shadow colors and are familiar with shader programming.