Search Unity

Question How to transfer data from fragment shader to meta pass?

Discussion in 'Shaders' started by RZR_SRT, Oct 26, 2020.

  1. RZR_SRT

    RZR_SRT

    Joined:
    Dec 18, 2012
    Posts:
    18
    Hi everyone! I'v wrote custom v2f hlsl shader for LWRP. It works fine for me, but I cant figure out how to transfer emission and albedo to meta pass. Any suggestions?
    And BTW I'm not using Unity's namespace. I'm still not strong at conversion for lwrp, so this way I'm avoiding errors with redefinition. Also I'm trying to write everything by my self- more control and efficiency in my case.
    Thanks!
     
    Last edited: Oct 26, 2020
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    Not sure if anything changed in URP/LWRP, but you don't generally "transfer" anything to the meta pass. You will need to remake what you're doing a second time in the meta pass if you want the lightmapper to see it. Although sometimes things don't work properly for reasons I'm not clear on.