by PaganRaven » Sun Dec 13, 2020 8:19 pm
Hey, I actually made progress on fixing this. Only one problem... there's a bunch of old screen in the borders. How do I get rid of that and paint it black?

- Screenshot_Hexen_20201213_211535.png (61.69 KiB) Viewed 6418 times
These are the adjustments I made:
Code: Select all
void FGLRenderer::PresentSideBySide()
{
mBuffers->BindOutputFB();
ClearBorders();
// Compute screen regions to use for left and right eye views
int leftWidth = screen->mOutputLetterbox.width / 2;
int rightWidth = screen->mOutputLetterbox.width - leftWidth;
//vbb added this
int height = screen->mOutputLetterbox.height / 2;
int top = height * .5;
IntRect leftHalfScreen = screen->mOutputLetterbox;
leftHalfScreen.width = leftWidth;
//vbb added this
leftHalfScreen.height = height;
leftHalfScreen.top = top;
IntRect rightHalfScreen = screen->mOutputLetterbox;
rightHalfScreen.width = rightWidth;
rightHalfScreen.left += leftWidth;
//vbb added this
rightHalfScreen.height = height;
rightHalfScreen.top = top;
mBuffers->BindEyeTexture(0, 0);
DrawPresentTexture(leftHalfScreen, true);
mBuffers->BindEyeTexture(1, 0);
DrawPresentTexture(rightHalfScreen, true);
}
Code: Select all
#define isqrt2 0.7071067812f
static VRMode vrmi_mono = { 1, 1.f, 1.f, 1.f,{ { 0.f, 1.f },{ 0.f, 0.f } } };
static VRMode vrmi_stereo = { 2, 1.f, 1.f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
//vbb fix vr mode
static VRMode vrmi_sbsfull = { 2, 1.f, 1.f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
//static VRMode vrmi_sbsfull = { 2, 0.5f, 1.f, 2.f,{ { -.5f, 2.f },{ .5f, 2.f } } };
static VRMode vrmi_sbssquished = { 2, .5f, 1.f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
static VRMode vrmi_lefteye = { 1, 1.f, 1.f, 1.f, { { -.5f, 1.f },{ 0.f, 0.f } } };
static VRMode vrmi_righteye = { 1, 1.f, 1.f, 1.f,{ { .5f, 1.f },{ 0.f, 0.f } } };
static VRMode vrmi_topbottom = { 2, 1.f, .5f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
static VRMode vrmi_checker = { 2, isqrt2, isqrt2, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
Hey, I actually made progress on fixing this. Only one problem... there's a bunch of old screen in the borders. How do I get rid of that and paint it black?
[attachment=0]Screenshot_Hexen_20201213_211535.png[/attachment]
These are the adjustments I made:
[code]
void FGLRenderer::PresentSideBySide()
{
mBuffers->BindOutputFB();
ClearBorders();
// Compute screen regions to use for left and right eye views
int leftWidth = screen->mOutputLetterbox.width / 2;
int rightWidth = screen->mOutputLetterbox.width - leftWidth;
//vbb added this
int height = screen->mOutputLetterbox.height / 2;
int top = height * .5;
IntRect leftHalfScreen = screen->mOutputLetterbox;
leftHalfScreen.width = leftWidth;
//vbb added this
leftHalfScreen.height = height;
leftHalfScreen.top = top;
IntRect rightHalfScreen = screen->mOutputLetterbox;
rightHalfScreen.width = rightWidth;
rightHalfScreen.left += leftWidth;
//vbb added this
rightHalfScreen.height = height;
rightHalfScreen.top = top;
mBuffers->BindEyeTexture(0, 0);
DrawPresentTexture(leftHalfScreen, true);
mBuffers->BindEyeTexture(1, 0);
DrawPresentTexture(rightHalfScreen, true);
}[/code]
[code]
#define isqrt2 0.7071067812f
static VRMode vrmi_mono = { 1, 1.f, 1.f, 1.f,{ { 0.f, 1.f },{ 0.f, 0.f } } };
static VRMode vrmi_stereo = { 2, 1.f, 1.f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
//vbb fix vr mode
static VRMode vrmi_sbsfull = { 2, 1.f, 1.f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
//static VRMode vrmi_sbsfull = { 2, 0.5f, 1.f, 2.f,{ { -.5f, 2.f },{ .5f, 2.f } } };
static VRMode vrmi_sbssquished = { 2, .5f, 1.f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
static VRMode vrmi_lefteye = { 1, 1.f, 1.f, 1.f, { { -.5f, 1.f },{ 0.f, 0.f } } };
static VRMode vrmi_righteye = { 1, 1.f, 1.f, 1.f,{ { .5f, 1.f },{ 0.f, 0.f } } };
static VRMode vrmi_topbottom = { 2, 1.f, .5f, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };
static VRMode vrmi_checker = { 2, isqrt2, isqrt2, 1.f,{ { -.5f, 1.f },{ .5f, 1.f } } };[/code]