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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Discussion Light variables not updated

Discussion in 'Shaders' started by Lefou1234567, Mar 3, 2023.

  1. Lefou1234567

    Lefou1234567

    Joined:
    Jul 6, 2022
    Posts:
    7
    Hello,

    I'm just begining to use lights in shaders, and I noticed that the built-in light variables (like
    _WorldSpaceLightPos0) are not updated if I toggle off the skybox and no default material is visible.
    I can't find a way to control this optimisation : P

    Thanks!
     
  2. Lefou1234567

    Lefou1234567

    Joined:
    Jul 6, 2022
    Posts:
    7
    Ok,

    I thought I already tried this out, but it seems the pass need the "LightMode" tag set to "ForwardBase" in order to get the new light data.