Revert "Configurable super sampling for PCVR (untested\!)"

This reverts commit 0e58a043ac.
This commit is contained in:
Simon 2023-12-20 18:36:25 +00:00
parent e5313e1b36
commit 671299dc6c
6 changed files with 12 additions and 39 deletions

View file

@ -280,7 +280,6 @@ void VR_Init()
vr_use_gesture_boundary = Cvar_Get ("vr_use_gesture_boundary", "0.35", CVAR_ARCHIVE);
vr_align_weapons = Cvar_Get ("vr_align_weapons", "0", CVAR_ARCHIVE);
vr_refresh = Cvar_Get ("vr_refresh", "72", CVAR_ARCHIVE);
vr_super_sampling = Cvar_Get ("vr_super_sampling", "1.0", CVAR_ARCHIVE);
cvar_t *expanded_menu_enabled = Cvar_Get ("expanded_menu_enabled", "0", CVAR_ARCHIVE);
if (FS_FileExists("expanded_menu.pk3") || FS_BaseFileExists("expanded_menu.pk3")) {

View file

@ -17,10 +17,6 @@
const float ZOOM_FOV_ADJUST = 1.1f;
float superSampling = 1.0f;
qboolean usingScreenLayer = qtrue;
qboolean resetScreenLayerRenderer = qfalse;
const char* const requiredExtensionNames[] = {
XR_KHR_OPENGL_ENABLE_EXTENSION_NAME};
@ -675,15 +671,8 @@ bool destroyed = qfalse;
void TBXR_GetScreenRes(int *width, int *height)
{
float configuredSuperSampling = Cvar_VariableValue("vr_super_sampling");
if (configuredSuperSampling != 0.0f && configuredSuperSampling != superSampling) {
superSampling = configuredSuperSampling;
resetScreenLayerRenderer = qtrue;
Cbuf_AddText( "vid_restart\n" );
}
*width = gAppState.Width * superSampling;
*height = gAppState.Height * superSampling;
*width = gAppState.Width;
*height = gAppState.Height;
}
XrInstance TBXR_GetXrInstance() {
@ -842,14 +831,11 @@ void TBXR_InitRenderer( ) {
gAppState.Views[eye].type = XR_TYPE_VIEW;
}
int eyeW, eyeH;
TBXR_GetScreenRes(&eyeW, &eyeH);
ovrRenderer_Create(
gAppState.Session,
&gAppState.Renderer,
eyeW,
eyeH);
gAppState.ViewConfigurationView[0].recommendedImageRectWidth,
gAppState.ViewConfigurationView[0].recommendedImageRectHeight);
}
void VR_DestroyRenderer( )
@ -858,13 +844,6 @@ void VR_DestroyRenderer( )
free(gAppState.Views);
}
void VR_ResetRenderer()
{
VR_DestroyRenderer();
TBXR_InitialiseResolution();
TBXR_InitRenderer();
}
void TBXR_InitialiseOpenXR()
{
// Create the OpenXR instance.
@ -1191,12 +1170,6 @@ void TBXR_submitFrame()
if (!VR_UseScreenLayer())
{
if (usingScreenLayer) {
usingScreenLayer = qfalse;
VR_ResetRenderer();
}
memset(&projection_layer, 0, sizeof(XrCompositionLayerProjection));
projection_layer.type = XR_TYPE_COMPOSITION_LAYER_PROJECTION;
projection_layer.layerFlags = XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT;
@ -1230,13 +1203,6 @@ void TBXR_submitFrame()
}
else
{
usingScreenLayer = qtrue;
if (resetScreenLayerRenderer) {
resetScreenLayerRenderer = qfalse;
VR_ResetRenderer();
}
//Empty black projection for now
memset(&projection_layer, 0, sizeof(XrCompositionLayerProjection));
projection_layer.type = XR_TYPE_COMPOSITION_LAYER_PROJECTION;

View file

@ -1089,6 +1089,8 @@
cvarFloatList { "0.8" 0.8 "0.9" 0.9 "1.0" 1.0 "1.1" 1.1 "1.2" 1.2 "1.3" 1.3 }
descText @MENUS_VR_SUPER_SAMPLING_DESC
cvar "vr_super_sampling"
cvarTest openXRHMD
showCvar { meta }
visible 0

View file

@ -1096,6 +1096,8 @@
cvarFloatList { "0.8" 0.8 "0.9" 0.9 "1.0" 1.0 "1.1" 1.1 "1.2" 1.2 "1.3" 1.3 }
descText @MENUS_VR_SUPER_SAMPLING_DESC
cvar "vr_super_sampling"
cvarTest openXRHMD
showCvar { meta }
visible 0

View file

@ -1293,6 +1293,8 @@
cvarFloatList { "0.8" 0.8 "0.9" 0.9 "1.0" 1.0 "1.1" 1.1 "1.2" 1.2 "1.3" 1.3 }
descText @MENUS_VR_SUPER_SAMPLING_DESC
cvar "vr_super_sampling"
cvarTest openXRHMD
showCvar { meta }
visible 0

View file

@ -1392,6 +1392,8 @@
cvarFloatList { "0.8" 0.8 "0.9" 0.9 "1.0" 1.0 "1.1" 1.1 "1.2" 1.2 "1.3" 1.3 }
descText @MENUS_VR_SUPER_SAMPLING_DESC
cvar "vr_super_sampling"
cvarTest openXRHMD
showCvar { meta }
visible 0