Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question How to use point lighting on a sprite from any direction? [2.5D/3D]

Discussion in '2D' started by ex-death, Dec 24, 2022.

  1. ex-death

    ex-death

    Joined:
    Dec 12, 2020
    Posts:
    1
    Hi all, working on a tactics based rpg, and I'm trying to work on lighting effects, I have it looking really cool so far, but the point light only works if the character passes the light source on the x axis.

    The character on the right(pic below) is supposed to be about as equally lit as the character on the right, but I can't figure out why it's not. I assume it's a weird order thing with the sprite being in front of the camera to be lit. Once the character moves past the light it goes dark, as if the light only shines in 1 direction rather than around it. The characters billboard so I don't need the opposite side to light up or anything.

    I'm currently using URP with this lit sprites shader from here:
    https://github.com/Jiaquarium/unity-URP-2.5D-lit-shader

    Any suggestions would be appreciated.

    Pic: spritePointLight.PNG