Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Spotlights not casting shadows in BiRP

Discussion in 'General Graphics' started by AkiraRagnas, Oct 9, 2023.

  1. AkiraRagnas

    AkiraRagnas

    Joined:
    Mar 15, 2016
    Posts:
    11
    Hi there,

    I'm attempting to use a Spot light to light my scene, and while it illuminates things the way I'd expect, nothing casts shadows, even though they do when using a Directional light. Is this the expected behavior? If not, how do I get the Spot light to cast shadows?

    I've seen this issue discussed at length using URP, but nothing in BiRP.

    I've tried playing with all the settings on the light, to no avail. Unity 2022.3.9f1.
     
  2. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    551
    There is not much to it. Just enable shadows on the spot light. You might also want to make sure they are realtime lights unless you want to bake them.

    upload_2023-10-9_8-41-44.png

    Also make sure that the objects that you are illuminating, cast and receive shadows (that's on by default).
    upload_2023-10-9_8-44-13.png

    upload_2023-10-9_8-46-45.png
     
    DevDunk likes this.
  3. AkiraRagnas

    AkiraRagnas

    Joined:
    Mar 15, 2016
    Posts:
    11
    Solved; the material that was receiving the shadows needed to have "fullforwardshadows" added to its shader. I appreciate your help!
     
    c0d3_m0nk3y likes this.
  4. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    551
    Interesting. Didn't know that. Thanks for sharing your solution. Glad you figured it out.
     
  5. AkiraRagnas

    AkiraRagnas

    Joined:
    Mar 15, 2016
    Posts:
    11
    Thank you for your help!
     
    c0d3_m0nk3y likes this.