Search Unity

Need help with CustomForward and stencil operation

Discussion in 'Universal Render Pipeline' started by TheTalkingBoot, Oct 11, 2019.

  1. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    Hello,

    How can I do stencil operation in LWRP/URP?
    With the old render pipeline I was able to do operation like that (not my shader here)


    But in LWRP/URP I don't understand how work the CustomForwardRenderer...
    Can anyone help me?
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you have to manually write (or tweak shader graph generated) shaders and simply add all needed stencil operations. it is straight forward.
     
  3. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    Sorry for my late reply.

    Thanks for your answer, this solution work. Hoping that the ShaderGraph developers integrate the option.
    As we don't have any documention for manually write shaders in URP.
     
  4. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    You mind sharing the code for this?