Compare commits

...

7 Commits

Author SHA1 Message Date
wheaney 5686887fb9 Initial attempt at GNOME SBS support 2024-06-10 19:41:56 -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
6 changed files with 31 additions and 22 deletions

2
.gitmodules vendored
View File

@ -5,9 +5,11 @@
[submodule "modules/XRLinuxDriver"]
path = modules/XRLinuxDriver
url = https://github.com/wheaney/XRLinuxDriver.git
branch = sbs
[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

@ -6,6 +6,7 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
if [ -z "$XDG_DATA_HOME" ]; then
XDG_DATA_HOME="$USER_HOME/.local/share"
fi
DATA_DIR="$XDG_DATA_HOME/breezy_gnome"
# if $XDG_DATA_HOME/gnome-shell/extensions/breezydesktop@xronlinux.com exists
extension_path="$XDG_DATA_HOME/gnome-shell/extensions/breezydesktop@xronlinux.com"
@ -18,3 +19,11 @@ fi
cp -rL $SCRIPT_DIR/../../src $extension_path
glib-compile-schemas $extension_path/schemas
pushd $extension_path
GNOME_MANIFEST_LINE=$(find -L . -type f ! -name "*.compiled" -exec sha256sum {} \; | sort | sha256sum | sed 's/ .*//')
popd
pushd $DATA_DIR
echo -e "$GNOME_MANIFEST_LINE breezydesktop@xronlinux.com" > manifest
popd

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,20 +50,20 @@ 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,
'display_size': null,
'display_north_offset': null,
'lens_distance_ratio': null,
'sbs_enabled': null,
'sbs_content': null,
'sbs_mode_stretched': null,
'custom_banner_enabled': null,
'half_fov_z_rads': null,
'half_fov_y_rads': null,
'screen_distance': null,
'display_res': null
'source_resolution': null,
'display_resolution': null,
'curved': null
};
function setUniformFloat(effect, locationName, dataViewInfo, value) {
@ -119,22 +119,19 @@ function setIntermittentUniformVariables() {
const imuData = dataViewFloatArray(dataView, IMU_QUAT_DATA);
const imuResetState = validKeepalive && imuData[0] === 0.0 && imuData[1] === 0.0 && imuData[2] === 0.0 && imuData[3] === 1.0;
const enabled = dataViewUint8(dataView, ENABLED) !== 0 && version === DATA_LAYOUT_VERSION && validKeepalive;
const displayRes = dataViewUintArray(dataView, DISPLAY_RES);
if (enabled) {
const displayRes = dataViewUintArray(dataView, DISPLAY_RES);
const displayFov = dataViewFloat(dataView, DISPLAY_FOV);
const lensDistanceRatio = dataViewFloat(dataView, LENS_DISTANCE_RATIO);
// 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 screenDistance = 1.0 - lensDistanceRatio;
const halfFovYRads = halfFovZRads * displayAspectRatio;
// 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,26 +140,26 @@ 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);
// TOOD - drive from settings
setSingleFloat(this, 'display_zoom', 1.0);
// TODO - drive from settings
setSingleFloat(this, 'display_size', 1.0);
}
// these variables are always in play, even if enabled is false
setSingleFloat(this, 'enabled', enabled ? 1.0 : 0.0);
setSingleFloat(this, 'show_banner', imuResetState ? 1.0 : 0.0);
setSingleFloat(this, 'sbs_content', 0.0); // TOOD - drive from settings
setSingleFloat(this, 'sbs_content', 0.0); // TODO - drive from settings
setSingleFloat(this, 'sbs_mode_stretched', 1.0); // content always fills the whole display
setSingleFloat(this, 'sbs_enabled', dataViewUint8(dataView, SBS_ENABLED) !== 0 ? 1.0 : 0.0);
setSingleFloat(this, 'custom_banner_enabled', dataViewUint8(dataView, CUSTOM_BANNER_ENABLED) !== 0 ? 1.0 : 0.0);
setSingleFloat(this, 'curved', 1.0); // TODO - drive from settings
this.set_uniform_float(shaderUniformLocations['display_res'], 2, [this.target_monitor.width, this.target_monitor.height]);
this.set_uniform_float(shaderUniformLocations['display_resolution'], 2, displayRes);
this.set_uniform_float(shaderUniformLocations['source_resolution'], 2, [this.target_monitor.width, this.target_monitor.height]);
} else if (dataView.byteLength !== 0) {
Globals.logger.log(`ERROR: Invalid dataView.byteLength: ${dataView.byteLength} !== ${DATA_VIEW_LENGTH}`)
}

@ -1 +1 @@
Subproject commit da9bfe14cdf198b3cd58ecf997324ebd358e8a61
Subproject commit 24478895f4369d056039e9e873b2caac5364b93e

@ -1 +1 @@
Subproject commit 26ece497d36bbe2a7445ea2f4e1cce31c35daa3a
Subproject commit 6ef467328ae388b5b129c1887f7f740a15ad443b