Esempio n. 1
0
    void RenderEye(SteamVR vr, Hmd_Eye eye, LayerMask mask)
    {
        int i = (int)eye;

        SteamVR_Render.eye = eye;

        if (cameraMask != null)
        {
            cameraMask.Set(vr, eye);
        }

        foreach (var c in cameras)
        {
            c.transform.localPosition = vr.eyes[i].pos;
            c.transform.localRotation = vr.eyes[i].rot;

            // Update position to keep from getting culled
            cameraMask.transform.position = c.transform.position;

            var camera = c.GetComponent <Camera>();
            camera.targetTexture = SteamVR_Camera.GetSceneTexture(camera.hdr);
            int cullingMask = camera.cullingMask;
            camera.cullingMask |= mask;
            camera.Render();
            camera.cullingMask = cullingMask;
        }
    }
internal static extern DistortionCoordinates_t SteamAPI_vr_IHmd_ComputeDistortion(IntPtr instancePtr, Hmd_Eye eEye, float fU, float fV);
internal static extern HmdMatrix44_t SteamAPI_vr_IHmd_GetProjectionMatrix(IntPtr instancePtr, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType);
    void RenderEye(SteamVR vr, Hmd_Eye eye, LayerMask mask)
    {
        int i = (int)eye;
        SteamVR_Render.eye = eye;

        if (cameraMask != null)
            cameraMask.Set(vr, eye);

        foreach (var c in cameras)
        {
            c.transform.localPosition = vr.eyes[i].pos;
            c.transform.localRotation = vr.eyes[i].rot;

            // Update position to keep from getting culled
            cameraMask.transform.position = c.transform.position;

            var camera = c.GetComponent<Camera>();
            camera.targetTexture = SteamVR_Camera.GetSceneTexture(camera.hdr);
            int cullingMask = camera.cullingMask;
            camera.cullingMask |= mask;
            camera.Render();
            camera.cullingMask = cullingMask;
        }
    }
Esempio n. 5
0
 /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
  * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection.
  * Normally View and Eye^-1 will be multiplied together and treated as View in your application.
  */
 public HmdMatrix34_t GetHeadFromEyePose(Hmd_Eye eEye)
 {
     return(SteamVR.GetHeadFromEyePose(m_pNativeObject, eEye));
 }
Esempio n. 6
0
 /** The components necessary to build your own projection matrix in case your
  * application is doing something fancy like infinite Z */
 public void GetProjectionRaw(Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom)
 {
     SteamVR.GetProjectionRaw(m_pNativeObject, eEye, ref pfLeft, ref pfRight, ref pfTop, ref pfBottom);
 }
Esempio n. 7
0
 /** The components necessary to build your own projection matrix in case your
 * application is doing something fancy like infinite Z */
 public void GetProjectionRaw(Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom)
 {
     SteamVR.GetProjectionRaw(m_pNativeObject, eEye, ref pfLeft, ref pfRight, ref pfTop, ref pfBottom);
 }
Esempio n. 8
0
 /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
 * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */
 public DistortionCoordinates_t ComputeDistortion(Hmd_Eye eEye, float fU, float fV)
 {
     return SteamVR.ComputeDistortion(m_pNativeObject, eEye, fU, fV);
 }
Esempio n. 9
0
 public abstract HmdMatrix44_t GetProjectionMatrix(Hmd_Eye eEye,float fNearZ,float fFarZ,GraphicsAPIConvention eProjType);
Esempio n. 10
0
 public abstract HiddenAreaMesh_t GetHiddenAreaMesh(Hmd_Eye eEye);
Esempio n. 11
0
 public abstract HmdMatrix34_t GetEyeToHeadTransform(Hmd_Eye eEye);
Esempio n. 12
0
 public abstract void GetEyeOutputViewport(Hmd_Eye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight);
Esempio n. 13
0
 public abstract DistortionCoordinates_t ComputeDistortion(Hmd_Eye eEye,float fU,float fV);
Esempio n. 14
0
 public abstract VRCompositorError Submit(Hmd_Eye eEye,GraphicsAPIConvention eTextureType,IntPtr pTexture,ref VRTextureBounds_t pBounds,VRSubmitFlags_t nSubmitFlags);
Esempio n. 15
0
 public static extern void GetEyeOutputViewport(System.IntPtr pHmd, Hmd_Eye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
Esempio n. 16
0
 public static extern HmdMatrix44_t GetProjectionMatrix(System.IntPtr pHmd, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType);
Esempio n. 17
0
 public abstract void GetProjectionRaw(Hmd_Eye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom);
Esempio n. 18
0
 /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
 * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection.
 * Normally View and Eye^-1 will be multiplied together and treated as View in your application.
 */
 public HmdMatrix34_t GetHeadFromEyePose(Hmd_Eye eEye)
 {
     return SteamVR.GetHeadFromEyePose(m_pNativeObject, eEye);
 }
Esempio n. 19
0
 internal static extern DistortionCoordinates_t VR_IVRSystem_ComputeDistortion(IntPtr instancePtr, Hmd_Eye eEye, float fU, float fV);
Esempio n. 20
0
 public override void GetProjectionRaw(Hmd_Eye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
 {
     CheckIfUsable();
     pfLeft = 0;
     pfRight = 0;
     pfTop = 0;
     pfBottom = 0;
     VRNativeEntrypoints.VR_IVRSystem_GetProjectionRaw(m_pVRSystem,eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
 }
Esempio n. 21
0
 internal static extern void VR_IVRSystem_GetEyeOutputViewport(IntPtr instancePtr, Hmd_Eye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
Esempio n. 22
0
 /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
  * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */
 public DistortionCoordinates_t ComputeDistortion(Hmd_Eye eEye, float fU, float fV)
 {
     return(SteamVR.ComputeDistortion(m_pNativeObject, eEye, fU, fV));
 }
Esempio n. 23
0
 internal static extern HmdMatrix34_t VR_IVRSystem_GetEyeToHeadTransform(IntPtr instancePtr, Hmd_Eye eEye);
Esempio n. 24
0
 public static extern void GetEyeOutputViewport(System.IntPtr pHmd, Hmd_Eye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
Esempio n. 25
0
 internal static extern HiddenAreaMesh_t VR_IVRSystem_GetHiddenAreaMesh(IntPtr instancePtr, Hmd_Eye eEye);
internal static extern void SteamAPI_vr_IHmd_GetEyeOutputViewport(IntPtr instancePtr, Hmd_Eye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
Esempio n. 27
0
 internal static extern HmdMatrix44_t VR_IVRSystem_GetProjectionMatrix(IntPtr instancePtr, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType);
internal static extern void SteamAPI_vr_IHmd_GetProjectionRaw(IntPtr instancePtr, Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
Esempio n. 29
0
 internal static extern void VR_IVRSystem_GetProjectionRaw(IntPtr instancePtr, Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
internal static extern HmdMatrix34_t SteamAPI_vr_IHmd_GetHeadFromEyePose(IntPtr instancePtr, Hmd_Eye eEye);
Esempio n. 31
0
 public static extern HmdMatrix44_t GetProjectionMatrix(System.IntPtr pHmd, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType);
Esempio n. 32
0
 public static extern HmdMatrix34_t GetHeadFromEyePose(System.IntPtr pHmd, Hmd_Eye eEye);
Esempio n. 33
0
 public static extern void GetProjectionRaw(System.IntPtr pHmd, Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
Esempio n. 34
0
 public static extern void GetProjectionRaw(System.IntPtr pHmd, Hmd_Eye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
Esempio n. 35
0
 public static extern DistortionCoordinates_t ComputeDistortion(System.IntPtr pHmd, Hmd_Eye eEye, float fU, float fV);
Esempio n. 36
0
 /** Gets the viewport in the frame buffer to draw the output of the distortion into */
 public void GetEyeOutputViewport(Hmd_Eye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight)
 {
     SteamVR.GetEyeOutputViewport(m_pNativeObject, eEye, ref pnX, ref pnY, ref pnWidth, ref pnHeight);
 }
Esempio n. 37
0
 public static extern HmdMatrix34_t GetHeadFromEyePose(System.IntPtr pHmd, Hmd_Eye eEye);
Esempio n. 38
0
 /** The projection matrix for the specified eye */
 public HmdMatrix44_t GetProjectionMatrix(Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType)
 {
     return SteamVR.GetProjectionMatrix(m_pNativeObject, eEye, fNearZ, fFarZ, eProjType);
 }
Esempio n. 39
0
 /** Gets the viewport in the frame buffer to draw the output of the distortion into */
 public void GetEyeOutputViewport(Hmd_Eye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight)
 {
     SteamVR.GetEyeOutputViewport(m_pNativeObject, eEye, ref pnX, ref pnY, ref pnWidth, ref pnHeight);
 }
Esempio n. 40
0
 public static extern DistortionCoordinates_t ComputeDistortion(System.IntPtr pHmd, Hmd_Eye eEye, float fU, float fV);
Esempio n. 41
0
 /** The projection matrix for the specified eye */
 public HmdMatrix44_t GetProjectionMatrix(Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType)
 {
     return(SteamVR.GetProjectionMatrix(m_pNativeObject, eEye, fNearZ, fFarZ, eProjType));
 }