From 1b45276de2686a083d263a67b014227a6c762346 Mon Sep 17 00:00:00 2001 From: samcake Date: Wed, 7 Jun 2017 15:55:38 -0700 Subject: [PATCH] Adjust the preview to avoid seeing the masked pixels in HMD mode --- .../src/display-plugins/hmd/HmdDisplayPlugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp index cab96c258b..08c8d4f754 100644 --- a/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp @@ -221,6 +221,12 @@ void HmdDisplayPlugin::internalPresent() { float shiftLeftBy = getLeftCenterPixel() - (sourceSize.x / 2); float newWidth = sourceSize.x - shiftLeftBy; + // Experimentally adjusted the region presented in preview to avoid seeing the masked pixels and recenter the center... + static float SCALE_WIDTH = 0.9f; + static float SCALE_OFFSET = 2.0f; + newWidth *= SCALE_WIDTH; + shiftLeftBy *= SCALE_OFFSET; + const unsigned int RATIO_Y = 9; const unsigned int RATIO_X = 16; glm::uvec2 originalClippedSize { newWidth, newWidth * RATIO_Y / RATIO_X };