Compare commits
7 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a6112892fd | |
|
|
7dcbafb73f | |
|
|
d9c0db7310 | |
|
|
2166dd55b5 | |
|
|
aced52c64b | |
|
|
2314ef35bf | |
|
|
bccbe687ed |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue