Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question Stencil Buffering Problems

Discussion in 'Shader Graph' started by Kalcen, Oct 9, 2019.

  1. Kalcen

    Kalcen

    Joined:
    Sep 19, 2016
    Posts:
    11
    I've been trying to figure out how make a material that uses stencil buffering through use of either LWRP's Custom Renderer Features or Shader Graph.

    My goal is to create a material that is double sided, with the front face pixels discarding any overlapping back face ones. I originally thought I could do this with alpha, but I realize now this doesn't actually discard the overlapping back face pixels because of the rendering order.

    I notice that there's a whole stencil option in the CustomRenderer > Render Features menu, but I can't seem to yield any results that way (probably because I don't know what any of the options mean, I'm not super knowledgeable about the standard procedure for this kind of effect :/ ). Would this be possible through existing or even custom nodes? Or would that be pushing it for Shader Graph's current functionality.

    Thanks for reading!