| 466 | } |
| 467 | |
| 468 | vr::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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected