Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ShadeSH9 is URP?

Discussion in 'Shaders' started by zezba9000, Jul 8, 2020.

  1. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    985
    I have a custom SRP and am trying to find info on supporting light-probes.
    Where in URP are light-probes handled in the shaders?

    Old shaders seem to use the method "ShadeSH9" but whats the URP way I can model after for a SRP?
     
  2. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
  3. OVRSuppleTeet

    OVRSuppleTeet

    Joined:
    Sep 21, 2018
    Posts:
    3
    For anyone else looking, I had to include Lighting.hlsl and use SampleSHVertex instead of ShadeSH9

    Code (CSharp):
    1. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    and

    Code (CSharp):
    1. SampleSHVertex(half3 normalWS)
     
    AshwinMods, LwHappyGame and cxode like this.