Compare commits

...

7 Commits

Author SHA1 Message Date
wheaney a6112892fd Initial attempt at GNOME SBS support 2024-06-09 11:46:36 -07:00
wheaney 7dcbafb73f Wrap up last RayNeo issues 2024-06-08 19:30:52 -07:00
wheaney d9c0db7310 Pull in RayNeo device name update 2024-06-06 19:19:21 -07:00
wheaney 2166dd55b5 Pull in a fix for sideview and a couple other tweaks 2024-06-05 12:52:43 -07:00
wheaney aced52c64b Pull in latest RayNeo integration with device model detection and SBS support 2024-06-05 10:43:12 -07:00
wheaney 2314ef35bf Pull in RayNeo fixes 2024-06-04 16:01:40 -07:00
wheaney bccbe687ed Add RayNeo support 2024-05-31 14:17:45 -07:00
5 changed files with 12 additions and 11 deletions

2
.gitmodules vendored
View File

@ -5,9 +5,11 @@
[submodule "modules/XRLinuxDriver"]
path = modules/XRLinuxDriver
url = https://github.com/wheaney/XRLinuxDriver.git
branch = rayneo
[submodule "modules/sombrero"]
path = modules/sombrero
url = https://github.com/wheaney/sombrero.git
branch = breezy_sbs
[submodule "ui/modules/PyXRLinuxDriverIPC"]
path = ui/modules/PyXRLinuxDriverIPC
url = https://github.com/wheaney/PyXRLinuxDriverIPC.git

View File

@ -20,6 +20,7 @@ const SUPPORTED_MONITOR_PRODUCTS = [
'Air',
'Air 2', // guessing this one
'Air 2 Pro',
'SmartGlasses', // TCL/RayNeo
'MetaMonitor' // nested mode dummy monitor
];

View File

@ -50,8 +50,6 @@ const shaderUniformLocations = {
'imu_quat_data': null,
'look_ahead_cfg': null,
'look_ahead_ms': null,
'stage_aspect_ratio': null,
'display_aspect_ratio': null,
'trim_width_percent': null,
'trim_height_percent': null,
'display_zoom': null,
@ -63,7 +61,8 @@ const shaderUniformLocations = {
'half_fov_z_rads': null,
'half_fov_y_rads': null,
'screen_distance': null,
'display_res': null
'source_resolution': null,
'display_resolution': null
};
function setUniformFloat(effect, locationName, dataViewInfo, value) {
@ -127,14 +126,13 @@ function setIntermittentUniformVariables() {
// compute these values once, they only change when the XR device changes
const displayAspectRatio = displayRes[0] / displayRes[1];
const stageAspectRatio = this.target_monitor.width / this.target_monitor.height;
const diagToVertRatio = Math.sqrt(Math.pow(stageAspectRatio, 2) + 1);
const diagToVertRatio = Math.sqrt(Math.pow(displayAspectRatio, 2) + 1);
const halfFovZRads = degreeToRadian(displayFov / diagToVertRatio) / 2;
const halfFovYRads = halfFovZRads * stageAspectRatio;
const halfFovYRads = halfFovZRads * displayAspectRatio;
const screenDistance = 1.0 - lensDistanceRatio;
// our overlay doesn't quite cover the full screen texture, which allows us to see some of the real desktop
// underneath, so we trim two pixels around the entire edge of the texture
// underneath, so we trim three pixels around the entire edge of the texture
const trimWidthPercent = 3.0 / this.target_monitor.width;
const trimHeightPercent = 3.0 / this.target_monitor.height;
@ -143,13 +141,13 @@ function setIntermittentUniformVariables() {
transferUniformFloat(this, 'lens_distance_ratio', dataView, LENS_DISTANCE_RATIO);
// computed values with no dataViewInfo, so we set these manually
setSingleFloat(this, 'stage_aspect_ratio', stageAspectRatio);
setSingleFloat(this, 'display_aspect_ratio', displayAspectRatio);
setSingleFloat(this, 'trim_width_percent', trimWidthPercent);
setSingleFloat(this, 'trim_height_percent', trimHeightPercent);
setSingleFloat(this, 'half_fov_z_rads', halfFovZRads);
setSingleFloat(this, 'half_fov_y_rads', halfFovYRads);
setSingleFloat(this, 'screen_distance', screenDistance);
effect.set_uniform_float(shaderUniformLocations['source_resolution'], 2, [target_monitor.width, target_monitor.height]);
effect.set_uniform_float(shaderUniformLocations['display_resolution'], 2, displayRes);
// TOOD - drive from settings
setSingleFloat(this, 'display_zoom', 1.0);

@ -1 +1 @@
Subproject commit da9bfe14cdf198b3cd58ecf997324ebd358e8a61
Subproject commit 828dfe78d188f5cc07fc50ce2695c694488e36c8

@ -1 +1 @@
Subproject commit 26ece497d36bbe2a7445ea2f4e1cce31c35daa3a
Subproject commit 9fe647c6ae9693fdea14329ed7e30c8c4c0a6b67