Couple of significant fixes

- Command line parameters now working again
- Using symmetrical render target to hopefully reduce "warping"
- Use ever so slightly reduced FOV as I think previous value was a little too high (also to reduce "warping")
- Updated to version 1.3.0
This commit is contained in:
Simon 2019-08-15 22:11:42 +01:00
parent b09f550937
commit 71fd7f6338
8 changed files with 33 additions and 51 deletions

2
.gitignore vendored
View file

@ -25,7 +25,6 @@ $RECYCLE.BIN/
*.apk
*.ap_
*.class
*.keystore
projects/Android/build/*
assets/oculussig*
Projects/Android/.externalNativeBuild/ndkBuild/debug/arm64-v8a/android_gradle_build.json
@ -45,3 +44,4 @@ Projects/Android/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_
Projects/Android/.externalNativeBuild/ndkBuild/release/arm64-v8a/ndkBuild_build_output.txt
Projects/Android/.gradle/4.6/fileHashes/fileHashes.lock
Projects/Android/.gradle/vcsWorkingDirs/gc.properties
drbeef-release-key.keystore

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.quakequest"
android:versionCode="7"
android:versionName="1.2.3" android:installLocation="auto" >
android:versionCode="9"
android:versionName="1.3.0" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

Binary file not shown.

View file

@ -14,7 +14,7 @@
#include "snd_main.h"
cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"};
cvar_t scr_fov = {CVAR_SAVE, "fov","110", "field of vision, 1-170 degrees, default 110, some players use 110-130"};
cvar_t scr_fov = {CVAR_SAVE, "vr_fov","108", "field of vision for VR - defaulted to 108"};
cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "0.85", "opacity of console background gfx/conback"};
cvar_t scr_conalphafactor = {CVAR_SAVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"};
cvar_t scr_conalpha2factor = {CVAR_SAVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};

View file

@ -3570,7 +3570,7 @@ static void M_Credits_Draw (void)
" QQQQQQQQ QQQQQQQQ ",
" QQQ QQQ ",
" Q Q ",
" Q Q v1.2.1 ");
" Q Q v1.3.0 ");
int i, l, linelength, firstline, lastline, lines;
for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++)

View file

@ -294,8 +294,9 @@ vec3_t hmdorientation;
extern float gunangles[3];
float weaponOffset[3];
float horizFOV;
float vertFOV;
float vrFOV;
float vrWidth;
float vrHeight;
int bigScreen = 1;
ovrMatrix4f modelScreen;
@ -719,8 +720,8 @@ static bool ovrFramebuffer_Create( ovrFramebuffer * frameBuffer, const GLenum co
PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC glFramebufferTextureMultisampleMultiviewOVR =
(PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) eglGetProcAddress( "glFramebufferTextureMultisampleMultiviewOVR" );
frameBuffer->Width = width * SS_MULTIPLIER;
frameBuffer->Height = height * SS_MULTIPLIER;
frameBuffer->Width = width;
frameBuffer->Height = height;
frameBuffer->Multisamples = multisamples;
frameBuffer->ColorTextureSwapChain = vrapi_CreateTextureSwapChain3( VRAPI_TEXTURE_TYPE_2D, colorFormat, frameBuffer->Width, frameBuffer->Height, 1, 3 );
@ -1007,29 +1008,28 @@ static void ovrRenderer_Create( ovrRenderer * renderer, const ovrJava * java )
ovrMatrix4f translation = ovrMatrix4f_CreateTranslation( 0, 0, -1.5f );
modelScreen = ovrMatrix4f_Multiply( &modelScreen, &translation );
horizFOV = vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_X);
vertFOV = vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_Y);
vrFOV = vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_X);
// Create the render Textures.
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
{
ovrFramebuffer_Create( &renderer->FrameBuffer[eye],
GL_RGBA8,
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ),
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ),
(int)vrWidth,
(int)vrHeight,
NUM_MULTI_SAMPLES );
}
ovrFramebuffer_Create( &renderer->QuakeFrameBuffer,
GL_RGBA8,
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ),
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ),
(int)vrWidth,
(int)vrHeight,
NUM_MULTI_SAMPLES );
// Setup the projection matrix.
renderer->ProjectionMatrix = ovrMatrix4f_CreateProjectionFov(
vrapi_GetSystemPropertyFloat( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_X ),
vrapi_GetSystemPropertyFloat( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_Y ),
vrFOV,
vrFOV,
0.0f, 0.0f, 1.0f, 0.0f );
}
@ -1208,35 +1208,19 @@ static ovrLayerProjection2 ovrRenderer_RenderFrame( ovrRenderer * renderer, cons
QC_BeginFrame(/* true to stop time if needed in future */ false);
ovrMatrix4f eyeViewMatrixTransposed[2];
eyeViewMatrixTransposed[0] = ovrMatrix4f_Transpose( &updatedTracking.Eye[0].ViewMatrix );
eyeViewMatrixTransposed[1] = ovrMatrix4f_Transpose( &updatedTracking.Eye[1].ViewMatrix );
ovrMatrix4f projectionMatrixTransposed[2];
projectionMatrixTransposed[0] = ovrMatrix4f_Transpose( &updatedTracking.Eye[0].ProjectionMatrix );
projectionMatrixTransposed[1] = ovrMatrix4f_Transpose( &updatedTracking.Eye[1].ProjectionMatrix );
ovrLayerProjection2 layer = vrapi_DefaultLayerProjection2();
layer.HeadPose = updatedTracking.HeadPose;
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
{
ovrFramebuffer * frameBuffer = &renderer->FrameBuffer[renderer->NumBuffers == 1 ? 0 : eye];
layer.Textures[eye].ColorSwapChain = frameBuffer->ColorTextureSwapChain;
layer.Textures[eye].SwapChainIndex = frameBuffer->TextureSwapChainIndex;
layer.Textures[eye].ColorSwapChain = frameBuffer->ColorTextureSwapChain;
layer.Textures[eye].SwapChainIndex = frameBuffer->TextureSwapChainIndex;
ovrMatrix4f projectionMatrix;
if (bigScreen) {
projectionMatrix = ovrMatrix4f_CreateProjectionFov(horizFOV, vertFOV,
0.0f, 0.0f, 0.1f,
0.0f);
} else{
projectionMatrix = ovrMatrix4f_CreateProjectionFov(horizFOV, vertFOV+4.0f,
0.0f, 0.0f, 0.1f,
0.0f);
}
layer.Textures[eye].TexCoordsFromTanAngles = ovrMatrix4f_TanAngleMatrixFromProjection(
&projectionMatrix);
projectionMatrix = ovrMatrix4f_CreateProjectionFov(vrFOV, vrFOV,
0.0f, 0.0f, 0.1f, 0.0f);
layer.Textures[eye].TexCoordsFromTanAngles = ovrMatrix4f_TanAngleMatrixFromProjection(&projectionMatrix);
layer.Textures[eye].TextureRect.x = 0;
layer.Textures[eye].TextureRect.y = 0;
@ -2270,6 +2254,11 @@ void * AppThreadFunction( void * parm )
// This app will handle android gamepad events itself.
vrapi_SetPropertyInt( &appState.Java, VRAPI_EAT_NATIVE_GAMEPAD_EVENTS, 0 );
//Using a symmetrical render target
vrWidth=vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER;
vrHeight=vrWidth;
ovrEgl_CreateContext( &appState.Egl, NULL );
EglInitExtensions();
@ -2306,24 +2295,17 @@ void * AppThreadFunction( void * parm )
{
if (!quake_initialised)
{
char *arg = (char*)ovrMessage_GetPointerParm( &message, 0 );
ALOGV( " Initialising Quake Engine" );
if (arg)
{
QC_SetResolution(vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER,
vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ) * SS_MULTIPLIER);
QC_SetResolution((int)vrWidth, (int)vrHeight);
if (argc != 0)
{
main(argc, argv);
}
else
{
int argc = 1; char *argv[] = { "quake" };
QC_SetResolution(vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER,
vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ) * SS_MULTIPLIER);
main(argc, argv);
}

View file

@ -1 +1 @@
quake --supersampling 1.3
quake --supersampling 1.35

View file

@ -53,7 +53,7 @@ bind MOUSE2 "+forward"
bind MOUSE3 "+mlook"
"cl_particles_quality" "2"
"cl_stainmaps" "1"
"fov" "110"
"vr_fov" "108"
"sensitivity" "4"
"snd_speed" "44100"
"cl_weapon_offset_ud" "0.1"