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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    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