Quantcast
Channel: Recent Discussions — Mixed Reality Developer Forum
Viewing all articles
Browse latest Browse all 10543

Stereoscopic RenderTexture in Unity

$
0
0

I'm trying to merge the outputs of two cameras on HoloLens (each rendering different content using culling masks and layers). My secondary camera targets a RenderTexture, and my primary camera has a script on it that takes that RenderTexture and additively renders it and its own using a simple shader.

My issue is that while the objects seen by the primary camera's view look fine, the secondary camera seems to lose perspective or something when rendering to a texture instead of to the screen: its object doesn't track properly in space, like it's not being rendered in stereo.

Both cameras are using the HoloLensCamera prefab supplied by HoloToolkit, and both are set to render to both eyes. Does rendering to a texture instead of to screen affect stereoscopic rendering?

I've attached a sample project to demonstrate the issue. In editor it looks fine, but if you run it on a HoloLens you'll see a sphere being rendered as expected, and a cube that demonstrates the problem.


Viewing all articles
Browse latest Browse all 10543

Trending Articles