mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 07:22:43 +02:00
Adjust the preview to avoid seeing the masked pixels in HMD mode
This commit is contained in:
parent
0bbbcbba67
commit
1b45276de2
1 changed files with 6 additions and 0 deletions
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue