Search Unity

Stencil Shader Bug?

Discussion in 'General Graphics' started by Tsuole, Mar 14, 2016.

  1. Tsuole

    Tsuole

    Joined:
    Feb 5, 2016
    Posts:
    12
    Hi everyone,

    I am using many stencil shaders for my project, and I have run into what I think is a bug.

    I am zooming in from picture to picture in the example. You can see that things appear and disappear suddenly (entire segments) in only very specific angles and distances from the object I am looking at. This doesnt appear to happen if I am very far away from the object.

    Is there some kind of cap/limit to the stencil buffer? Or is this a bug anybody knows how to fix?

    Thanks!
     

    Attached Files:

  2. smosh92

    smosh92

    Joined:
    Jun 28, 2015
    Posts:
    12
    it's probably too late to answer your question lol but i had a similar problem and in my case it the value to the render queue. make sure the stencil mask shader is rendered before the object using the stencil effect shader
     
    KappaTheKid likes this.