mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-03 01:22:12 +00:00
7c37bad4ac
commit57ebeb79e2
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! commit16299b3f8a
Author: Simon <simonbrown77@googlemail.com> Date: Tue Feb 14 20:51:03 2023 +0000 Get floor height offset correct for each game commitfa74cf0559
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 commitdeb2c35988
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 commitf1a165add7
Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 21:44:42 2023 +0000 FInal changes to get MV rendering correctly commit936f079db8
Merge:06a99dbaf
f8c1f49e6
Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 11:29:23 2023 +0000 Merge branch 'multiview' into direct-eye-buffers commit06a99dbafb
Author: Simon <simonbrown77@googlemail.com> Date: Mon Feb 13 11:26:44 2023 +0000 Implementation using no additional frame buffers commitf8c1f49e6f
Author: Simon <simonbrown77@googlemail.com> Date: Sun Feb 12 11:19:27 2023 +0000 Failed attempt at multiview
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#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,
|
|
VR_SIDEBYSIDELETTERBOX = 8,
|
|
VR_AMBERBLUE = 9,
|
|
VR_TOPBOTTOM = 11,
|
|
VR_ROWINTERLEAVED = 12,
|
|
VR_COLUMNINTERLEAVED = 13,
|
|
VR_CHECKERINTERLEAVED = 14,
|
|
VR_OPENXR = 15
|
|
};
|
|
|
|
struct VREyeInfo
|
|
{
|
|
float mShiftFactor;
|
|
float mScaleFactor;
|
|
|
|
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;
|
|
|
|
private:
|
|
float getShift() const;
|
|
int getEye() const;
|
|
|
|
float getStereoSeparation(double stereoLevel) const;
|
|
};
|
|
|
|
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;
|
|
};
|