Forum Discussion
Anonymous
10 years agoStereoscopic UI
Hello,
Is there a way to render UI (canvas) elements in Unity per eye?
I have image buttons and I'd like to have a separate image for each eye. I assigned each image to it's own layer and added or removed that layer from camera's culling mask but It doesn't work. It works for 3d objects (like sphere that I use to render 360 stereo video). I can assign the whole Canvas to an eye, but not it's children.
One of the solutions I came up with is to replace images with plane objects, but this is my last resort since buttons contain other children and this would complicate things.
Any suggestion or solution very much appreciated!
Is there a way to render UI (canvas) elements in Unity per eye?
I have image buttons and I'd like to have a separate image for each eye. I assigned each image to it's own layer and added or removed that layer from camera's culling mask but It doesn't work. It works for 3d objects (like sphere that I use to render 360 stereo video). I can assign the whole Canvas to an eye, but not it's children.
One of the solutions I came up with is to replace images with plane objects, but this is my last resort since buttons contain other children and this would complicate things.
Any suggestion or solution very much appreciated!
5 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffYes, you can use Camera.stereoTargetEye.
- AnonymousI already have Target Eye Left for the left camera and Target Eye Right for the right camera. Left camera renders leftEye layer and right camera renders rightEye layer. But if I set button's layer to ie. leftLayer, the button is still visible on both cameras. It seem as if this camera separation only works for non-ui elements (besides Canvas)
- vrdavebOculus StaffSounds like either not all of your Renderers are in the right layers or Unity's not respecting Camera.layerMask for UI objects. Can you click Help > Report a bug... and share the case number it emails you here?
- AnonymousOkay, I reported the bug. Case number 825252.
- AnonymousOkay, I reported the bug. Case number is 825252 .
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago
- 7 months ago
- 2 years ago
- 8 months ago