raze/source/common/rendering/hwrenderer/data/hw_vrmodes.h

55 lines
1.1 KiB
C
Raw Normal View History

2020-04-26 21:17:54 +00:00
#pragma once
#include "matrix.h"
class DFrameBuffer;
enum
{
VR_MONO = 0,
VR_GREENMAGENTA = 1,
VR_REDCYAN = 2,
VR_SIDEBYSIDEFULL = 3,
VR_SIDEBYSIDESQUISHED = 4,
VR_LEFTEYEVIEW = 5,
VR_RIGHTEYEVIEW = 6,
VR_QUADSTEREO = 7,
2021-01-29 12:20:00 +00:00
VR_SIDEBYSIDELETTERBOX = 8,
2020-04-26 21:17:54 +00:00
VR_AMBERBLUE = 9,
VR_TOPBOTTOM = 11,
VR_ROWINTERLEAVED = 12,
VR_COLUMNINTERLEAVED = 13,
VR_CHECKERINTERLEAVED = 14,
VR_OPENXR = 15
2020-04-26 21:17:54 +00:00
};
struct VREyeInfo
{
float mShiftFactor;
float mScaleFactor;
Squashed commit of the following: commit 57ebeb79e204527bb42256ba0499fae2655dde04 Author: Simon <simonbrown77@googlemail.com> Date: Thu Feb 16 22:07:38 2023 +0000 Fixed issue with FrameSetup being called in the wrong place this seemed to limit the correctly submitted frames to 60 fps! commit 16299b3f8a4417978d988fce62db9572a879a3f6 Author: Simon <simonbrown77@googlemail.com> Date: Tue Feb 14 20:51:03 2023 +0000 Get floor height offset correct for each game commit fa74cf0559b00b2b3fe495bd63f3d2591c5666e4 Author: Simon <simonbrown77@googlemail.com> Date: Tue Feb 14 20:37:29 2023 +0000 Clean exit on Pico & Quest and gold tier patron credit screen commit deb2c35988322a6e05f76f01fb867856b495b7a2 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 22:22:29 2023 +0000 Number of small changed - Hide crosshair if it isn't needed - Don't draw black bar when drawing FPS counter - added roll in to the weapon sprite - If drawing full screen mode always use orthographic projection commit f1a165add78e97ffde804c86a00eda984c9b1d16 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 21:44:42 2023 +0000 FInal changes to get MV rendering correctly commit 936f079db8e90756fe09fceae7b67a9c46d214cb Merge: 06a99dbaf f8c1f49e6 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 11:29:23 2023 +0000 Merge branch 'multiview' into direct-eye-buffers commit 06a99dbafbde961d2cd5ec1fb459e51a283da098 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 11:26:44 2023 +0000 Implementation using no additional frame buffers commit f8c1f49e6f7599bff4e779bc933f35ec9aa3cbf4 Author: Simon <simonbrown77@googlemail.com> Date: Sun Feb 12 11:19:27 2023 +0000 Failed attempt at multiview
2023-02-16 22:09:25 +00:00
VSMatrix GetCenterProjection(float fov, float aspectRatio, float fovRatio) const;
VSMatrix GetStereoProjection(float fov, float aspectRatio, float fovRatio) const;
DVector3 GetViewShift(FRotator angles) const;
VSMatrix GetHUDProjection(int width, int height) const;
VSMatrix GetPlayerSpriteProjection(int width, int height) const;
2020-04-26 21:17:54 +00:00
private:
float getShift() const;
int getEye() const;
Squashed commit of the following: commit 57ebeb79e204527bb42256ba0499fae2655dde04 Author: Simon <simonbrown77@googlemail.com> Date: Thu Feb 16 22:07:38 2023 +0000 Fixed issue with FrameSetup being called in the wrong place this seemed to limit the correctly submitted frames to 60 fps! commit 16299b3f8a4417978d988fce62db9572a879a3f6 Author: Simon <simonbrown77@googlemail.com> Date: Tue Feb 14 20:51:03 2023 +0000 Get floor height offset correct for each game commit fa74cf0559b00b2b3fe495bd63f3d2591c5666e4 Author: Simon <simonbrown77@googlemail.com> Date: Tue Feb 14 20:37:29 2023 +0000 Clean exit on Pico & Quest and gold tier patron credit screen commit deb2c35988322a6e05f76f01fb867856b495b7a2 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 22:22:29 2023 +0000 Number of small changed - Hide crosshair if it isn't needed - Don't draw black bar when drawing FPS counter - added roll in to the weapon sprite - If drawing full screen mode always use orthographic projection commit f1a165add78e97ffde804c86a00eda984c9b1d16 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 21:44:42 2023 +0000 FInal changes to get MV rendering correctly commit 936f079db8e90756fe09fceae7b67a9c46d214cb Merge: 06a99dbaf f8c1f49e6 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 11:29:23 2023 +0000 Merge branch 'multiview' into direct-eye-buffers commit 06a99dbafbde961d2cd5ec1fb459e51a283da098 Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 11:26:44 2023 +0000 Implementation using no additional frame buffers commit f8c1f49e6f7599bff4e779bc933f35ec9aa3cbf4 Author: Simon <simonbrown77@googlemail.com> Date: Sun Feb 12 11:19:27 2023 +0000 Failed attempt at multiview
2023-02-16 22:09:25 +00:00
float getStereoSeparation(double stereoLevel) const;
2020-04-26 21:17:54 +00:00
};
struct VRMode
{
int mEyeCount;
float mHorizontalViewportScale;
float mVerticalViewportScale;
float mWeaponProjectionScale;
VREyeInfo mEyes[2];
static const VRMode *GetVRMode(bool toscreen = true);
void AdjustViewport(DFrameBuffer *fb) const;
};