Skip to main content
Up and Coming
July 23, 2015

Mirror Texture prior to distortion effects?

I'm creating the mirror texture to display on the desktop, but it has all the distortion effects applied... is there a way the SDK can provide this texture without the distortion effects? For example a red triangle down in the corner of the display gets badly color separated. So I'm wondering what the design goal of the mirror texture is?

If it is 'to see what the player sees', then maybe observers also need some thick glasses :) So then the vingette makes sense, but maybe not the other effects? or am am missing something here.

    4 replies

    Inspiring
    July 23, 2015
    Since you're responsible for handing the the undistorted texture to the Oculus SDK, there's no reason you can't also use the same texture for your mirror window, without distortion or chroma effects. The only downside is that if you're using the Oculus compositor to put multiple layers together (like a scene and a bunch of UI) then you're responsible for compositing them on the mirror display. If you're just sending one texture, then you're fine doing the mirror yourself.

    One caveat, don't use the Oculus provided textures to do this. If you're drawing directly to the Oculus textures, you'll need to blit the contents to another texture before executing Submit, and before calling your mirror window draw.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Inspiring
    July 23, 2015
    This is possible with Unity 5.1.1 first party support.

    If you are working with your own engine, then jherico's advice sounds correct.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    July 28, 2015
    "jherico" wrote:
    Since you're responsible for handing the the undistorted texture to the Oculus SDK, there's no reason you can't also use the same texture for your mirror window


    I had considered using 'the pre-submit texture, but as you mentioned, this misses the compositing, but also the vingette, which almost feels like it should be there, even though I only display one eye on the desktop, 'cyclops mode' as I call it :) So if I do it myself, does the Desktop really reflect what the player sees? ie. no distortion means that no vignette is required anyway?

    Besides the color separation issue, a linear pointer movement within my app seems to be curved on the desktop mirror, which I assume to be the lens 'barrel' distortion. But I also see some sort of delayed shadowing, like the old windows NT pointer trailer option. Difficult to capture or see:

    https://www.youtube.com/watch?v=ZD1ry73TW2I

    Doing all that by hand is going to be a performance hit and seems to make the mirror texture obsolete, which again makes me wonder what the mirror texture is for.


    "cybereality" wrote:
    This is possible with Unity 5.1.1 first party support.

    If you are working with your own engine, then jherico's advice sounds correct.


    yes I'm still working with Java and OpenGL - multi-platform ;)

    Does Unity have access to some of the SDK that we dont then? or is Unity also using the pre-submit texture?
    DK2, MBP (mid 2010) OSX 10.10.3. Win7 - i5 4670K - GTX770. Java LWJGL 3 OpenGL Experiments: https://github.com/WhiteHexagon
    Inspiring
    July 28, 2015
    The Unity first-party VR support in integrated directly into the engine by them. So they are able to make certain optimizations and things that would be difficult for a plugin. However, if you have your own engine, then I imagine you could do something similar.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV