Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
435 views
in Technique[技术] by (71.8m points)

unity3d - Are masked sprites and Stencil Buffers in Unity only visible on one eye if deployed on HoloLens2?

Is it possible that Sprite Renderer in a HoloLens2 Unity Project, which are masked via a SpriteMask are only visible on one eye in the final HoloLens2 build (UWP via VisualStudio2019 deployed on HoloLens2 device). I also experienced the same behaviour on elements which are masked with a StencilShader. I am using a 24-bit depth buffer for my unity project if that helps, otherways the StencilShader wouldn′t work.

question from:https://stackoverflow.com/questions/66063097/are-masked-sprites-and-stencil-buffers-in-unity-only-visible-on-one-eye-if-deplo

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To display certain objects to one eye, for different rendering configurations, different ways need to be used.

With MultiPass, you should be able to set a camera to render to only one eye(Camera component -> Output-> Target Eye), so doing per eye stuff is super easy. With Stereo Instancing, you can draw in Shader but you will need to multiply the projection matrix of the current eye.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...