MCPcopy Create free account
hub / github.com/LibreVR/Revive / FovPortToTextureBounds

Method FovPortToTextureBounds

Revive/CompositorBase.cpp:468–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468vr::VRTextureBounds_t CompositorBase::FovPortToTextureBounds(ovrFovPort eyeFov, ovrFovPort fov)
469{
470 vr::VRTextureBounds_t result;
471
472 // Adjust the bounds based on the field-of-view in the game
473 result.uMin = (fov.LeftTan - eyeFov.LeftTan) / (fov.LeftTan + fov.RightTan);
474 result.uMax = 1.0f - (fov.RightTan - eyeFov.RightTan) / (fov.LeftTan + fov.RightTan);
475 result.vMin = (fov.UpTan - eyeFov.UpTan) / (fov.UpTan + fov.DownTan);
476 result.vMax = 1.0f - (fov.DownTan - eyeFov.DownTan) / (fov.UpTan + fov.DownTan);
477
478 return result;
479}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected