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

Question Is it possible to recreate the URP Baked Lit shader in shader graph?

Discussion in 'Shader Graph' started by JoeGovi_HealthScholars, Apr 7, 2023.

  1. JoeGovi_HealthScholars

    JoeGovi_HealthScholars

    Joined:
    Jan 27, 2021
    Posts:
    5
    Hello!

    There are optimizations with how lighting is handled with the URP Baked Lit shader that I would like to replicate with some shader tweaks in shader graph but I am unsure what the guts are of that shader. Optimization is important to me as I am working in a mobile VR platform.

    Alternatively, is there an way to do a very optimized lit shader that does something similar?

    Thank you for any responses
     
  2. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    637
    Hey, no because the supported material types of URP shader graph are Lit & Complex Lit (Clear Coat ticked) only. So unless you use an Unlit graph, there'll be lighting calculations that cost performance.

    Maybe you can try copying and modifying the Baked Lit shader & its include files? This is really inconvenient when upgrading the URP version but there's no other easy way to do it.
     
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Make an unlit shader and get GI baked data maybe?
     
  4. JoeGovi_HealthScholars

    JoeGovi_HealthScholars

    Joined:
    Jan 27, 2021
    Posts:
    5