mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-10 06:42:17 +00:00
Made screen layer much flatter
This commit is contained in:
parent
0edba3662d
commit
10cd6ad67d
1 changed files with 4 additions and 12 deletions
|
@ -120,7 +120,7 @@ static ovrMatrix4f CylinderModelMatrix( const int texWidth, const int texHeight,
|
||||||
const float radius,
|
const float radius,
|
||||||
const float density )
|
const float density )
|
||||||
{
|
{
|
||||||
const ovrMatrix4f scaleMatrix = ovrMatrix4f_CreateScale( radius, radius * (float)texHeight * VRAPI_PI / density, radius );
|
const ovrMatrix4f scaleMatrix = ovrMatrix4f_CreateScale( radius, radius * (float)texHeight * VRAPI_PI / density, radius / 2 );
|
||||||
const ovrMatrix4f transMatrix = ovrMatrix4f_CreateTranslation( translation.x, translation.y, translation.z );
|
const ovrMatrix4f transMatrix = ovrMatrix4f_CreateTranslation( translation.x, translation.y, translation.z );
|
||||||
const ovrMatrix4f rotXMatrix = ovrMatrix4f_CreateRotation( rotateYaw, 0.0f, 0.0f );
|
const ovrMatrix4f rotXMatrix = ovrMatrix4f_CreateRotation( rotateYaw, 0.0f, 0.0f );
|
||||||
const ovrMatrix4f rotYMatrix = ovrMatrix4f_CreateRotation( 0.0f, rotatePitch, 0.0f );
|
const ovrMatrix4f rotYMatrix = ovrMatrix4f_CreateRotation( 0.0f, rotatePitch, 0.0f );
|
||||||
|
@ -152,18 +152,10 @@ ovrLayerCylinder2 BuildCylinderLayer( ovrRenderer * cylinderRenderer,
|
||||||
|
|
||||||
layer.HeadPose = tracking->HeadPose;
|
layer.HeadPose = tracking->HeadPose;
|
||||||
|
|
||||||
const float density = 4500.0f;
|
const float density = 15000.0f;
|
||||||
const float rotateYaw = 0.0f;
|
const float rotateYaw = 0.0f;
|
||||||
const float radius = 2.0f;
|
const float radius = 10.0f;
|
||||||
//GB Hacky Override
|
const ovrVector3f translation = { 0.0f, playerHeight/1.8f, -vr_screen_dist->value };
|
||||||
float screen_offset = 0;
|
|
||||||
if(textureWidth > 1900)
|
|
||||||
{
|
|
||||||
screen_offset = -2.625f;
|
|
||||||
}
|
|
||||||
const float distance = vr_screen_dist ? -vr_screen_dist->value + screen_offset : -3.5f + screen_offset;
|
|
||||||
|
|
||||||
const ovrVector3f translation = { 0.0f, playerHeight/2, distance };
|
|
||||||
|
|
||||||
ovrMatrix4f cylinderTransform =
|
ovrMatrix4f cylinderTransform =
|
||||||
CylinderModelMatrix( textureWidth, textureHeight, translation,
|
CylinderModelMatrix( textureWidth, textureHeight, translation,
|
||||||
|
|
Loading…
Reference in a new issue