Search Unity

Rendering different content to each eye with SteamVR plugin

Discussion in 'AR/VR (XR) Discussion' started by menderbug, Aug 24, 2018.

  1. menderbug

    menderbug

    Joined:
    May 14, 2018
    Posts:
    26
    I'm having a hard time figuring out how to render different things to each eye with the SteamVR plugin for Unity. When I google around for this, I just find posts that are outdated (back when the plugin still had separate camera objects for each eye, so you could just put different culling masks on them). But these days, there's only one camera which gets moved between eyes for two rendering passes. Either culling masks or an event before each eye or being able to determine the current eye in a shader would do the trick for me.

    The readme.txt of the plugin in says:

    [The [SteamVR] prefab] also provides the ability to set special masks for rendering each eye (in case you want to do something differently per-eye) and some simple help text that demonstrates rendering only to the companion window (which can be cleared or customized here).
    Unfortunately, I'm not seeing any option to actually do that. Is this part of the readme outdated? Or does "provides the ability" something else than "has properties to set special masks in the inspector"?​

    So what's the current best practice for this? Any help would be greatly appreciated. :)
     
    Last edited: Aug 24, 2018