Skip to main content
Up and Coming
August 20, 2014

OculusPlugin.dll Source Code for Unity Integration 0.4.1

I was wondering if there was any way we could look at the source code for Unity Integration of the OculusPlugin.dll? I'm currently trying to work out how the Oculus renders in Unity's pipeline and I am finding it hard, despite the best efforts of the devs on this forum.
    This topic has been closed for replies.

    3 replies

    Inspiring
    September 9, 2014
    So far the PC/Mac plugin source has not been released, but it may be in the future. All it does now is maintain the gamepad, export CAPI functions, and make the standard render-thread calls to ovrHmd_BeginFrame(..), ovrHmd_EndFrame(..), and ovrHmd_GetTrackingState(..) for distortion rendering. We do some tricky things to get the D3D11 constructs we need for that and to make ovrHmd_EndFrame's buffer swap supersede the usual one, but they shouldn't affect app behavior. The main things to be aware of are (1) all distortion rendering calls are made from the render thread, (2) we compute a frame's rendering pose immediately after the previous frame's ovrHmd_EndFrame() call to minimize scheduling variability, and (3) we call ovrHmd_EndFrame at almost exactly the same point where the buffer swap would normally occur, which should be after all rendering, image effects, and GUI drawing are done. We also detect the editor's Game view by comparing its resolution to Screen.width and Screen.height, which can lead to problems if they are almost the same. Hope that helps.
    New Participant
    December 10, 2014
    Hi,

    Would it be possible to release the source code nowish? We have investors coming to look at our project in a few days, and we are completely blocked because we cannot modify the API and compile a .dll for Unity.

    This is urgent for us. If there is a price-tag associated with this access, we will pay it.

    It seems rather convoluted to use a third party solution, or create our own, just to make updates to the API ;)

    Marvin Friedrich
    marvinfriedrich@gmail.com

    Lead Engineer
    The Void
    thevoid.com
    Inspiring
    December 10, 2014
    So it doesn't appear the source code is public at the moment.

    It's still a possibility in the future, but I would not set plans or deadlines based on this happening.
    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