I'm trying to use the stencil buffer to mask an object, such that the object is only rendered within the bounds of the mask. On the editor, it works fine, but it's not masked at all with the hololens. The shaders seem to be loaded correctly. Honestly, I'd ideally like to do it without the shaders, since I have a biggish model, and when I use the shader with the stencil buffer, it breaks them a bit. Is there a way to do that, does anyone know? Main issue is the first one, though. Thanks!
Hello, Can you give a little more information on the mask you are using and how you are using it? This sounds like a simular issue to this thread, can you look through and see if the tips provide by Brandon help you with this issue. https://forum.unity3d.com/threads/ui-mask-failing-on-hololens-works-on-preview-fine.424998/ Thank you, Wesley
Yes, I had a look at that, but it seems to be an inbuilt component. I'm using two shaders for my mask. One that writes to the stencil buffer, essentially, for the space it occupies, it writes "1" in the space. Then I attach shaders to my objects checking for that reference, and only render if it equals it. In essence, if they overlap, render; otherwise, don't. I mildly solved the issue by unchecking the 16 bit depth buffer. Though I now have the issue of them not being in the same place. Again, on the editor, it works fine. On the hololens, I tried scaling my object, and eventually it seems to intersect the mask, but in a completely random place. They're both children of another gameobject, so I can move them both around, but they're both at position (0, 0, 0). When I change the shader, it displays fine. When I changed the mask's shader to a normal one, it displays fine. The only difference is the stencil buffer writing.
That is interesting, can you please file a bug report with this information in it. Also, can you attach a simple project to the bug that reproduces this issue. This way we can investigate the issue quickly