Search Unity

how to do an XOR Stencil in Unity?

Discussion in 'Shaders' started by XRA, Feb 27, 2015.

  1. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    I'm trying to make geometry only render when inside another piece of geometry. Like if you had a Sphere partially intersecting a Cube, only the part of the sphere inside the cube would be visible.

    I've seen another post which says to use an XOR Stencil... but I can't find any information about how to write an XOR stencil.

    can anyone help?
     
  2. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    415