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.

Bug No shadows on URP

Discussion in 'VR' started by Liminal-Ridges, Nov 30, 2022.

  1. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    I have a urp project for quest 2. In unity the shadows work fine (id like to be able to increase the strength more), on the device they are nonexistent. Any idea? I use point lights. Box lights are enabled.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    Which unity version?
    Vulkan or OpenGL?
    Single pass/multiview or multipass?
    Did you also try to get shadows with spotlights or directional light? (point lights are crazy expensive btw)
    Do you use the same Graphics quality tier in both editor and android? If not, do that
     
  3. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    I have been using unity for 11 years and didnt know you can change platform default quality. Lights fixed but the shadows are weak. I have strength to 1. Is there a way to make them more visible? Im on Unity latest LTS, with openGL3 and multiview. Problem is now the camera movement very laggy. I guess its the fps low
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    1. What do you mean stronger? Do you mean more visible? If so, go to lighting settings - environment and here change ambience lighting and other parameters
    2. That could be. Quest standalone isn't that strong and needs a lot of optimization. Running the profiler might help (or hire me if needed (; )
     
  5. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    Thank you but that didnt work. Ambient color just makes the whole scene darker. I managed to increase the fps with baked light :D
     
    DevDunk likes this.
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    Baked always is better for performance. Using BakedLit shaders will be an even bigger move
     
  7. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    Unfortunately that shader is S***. Thankfully Lit does the job without dropping the fps! Problem is my line renderer (mobile>particles>additive) and textmeshpro texts are invisible now
     
  8. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    also when baking it only bakes shadows for one light source in the scene, i got two point lights
     
  9. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    Make sure they're static as well and set to baked
     
  10. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    both static and baked but only one shadows baked. maybe its a setting in light settings? also baking seems to remove smoothness from the materials
     
  11. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    alright i managed to solve most problems but for some reason lighting is dead on device. Works fine on unity tho here are the settings https://imgur.com/a/HiVZbEw

    UPDATE: checking mixed lights fixed it
     
    Last edited: Dec 2, 2022
  12. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    Sorry to bother @DevDunk im having problems with unitys retarded light system again. Its dead. Point light in vr. Any ideas?
     
  13. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    If you need help be specific.
    1. What does it's dead mean?
    2. Is there a specific lighting system which is retarded? Doesn't really help to clarify
     
  14. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    i have a vr project that uses urp and a single point light in the scene. It works in unity but when deployed on the device its disabled. I tried every relative setting but nothing. It seems to be a bug specific to point lights cause directional light works
     
  15. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    Remove all graphics quality tiers except one. Additional lights probably are just disabled on the android tier
     
  16. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    yea that was it. But i had the high quality set to default tho
     
  17. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    Maybe not for android?
     
  18. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    237
    it was i double checked. Anyway thanks again great guy happy new year!
     
  19. dclipca

    dclipca

    Joined:
    Oct 30, 2021
    Posts:
    6
    Have the same behaviour. Even though the highest quality is selected by default for Android, it is switched to lowest in builds. Quest 2.
     
  20. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,451
    Also if you remove all other graphics tiers and have selected the high quality urp asset in proj settings - Graphics?
     
  21. dclipca

    dclipca

    Joined:
    Oct 30, 2021
    Posts:
    6
    No, if I remove everything except High Quality then High Quality is selected in the build, just like in your case.