Update XR driver and sombrero to work with Breezy Vulkan

This commit is contained in:
wheaney 2024-09-04 21:31:58 -07:00
parent 8e772dd05e
commit d2d40d2931
7 changed files with 11 additions and 7 deletions

1
.gitmodules vendored
View File

@ -5,6 +5,7 @@
[submodule "modules/XRLinuxDriver"]
path = modules/XRLinuxDriver
url = https://github.com/wheaney/XRLinuxDriver.git
branch = unified_shader
[submodule "modules/sombrero"]
path = modules/sombrero
url = https://github.com/wheaney/sombrero.git

View File

@ -43,6 +43,7 @@ cp $VKBASALT_BUILD_DIR/builddir.32/src/libvkbasalt.so $PACKAGE_DIR/vkBasalt.32/
# copy Sombrero FX, get ReShade headers
cp modules/sombrero/*.fx $PACKAGE_DIR
cp modules/sombrero/*.frag $PACKAGE_DIR
cp modules/sombrero/*.png $PACKAGE_DIR
wget -P $PACKAGE_DIR https://raw.githubusercontent.com/crosire/reshade-shaders/384465d0287999caa6190b5ebea506200b4f4a0a/Shaders/ReShade.fxh
wget -P $PACKAGE_DIR https://raw.githubusercontent.com/crosire/reshade-shaders/384465d0287999caa6190b5ebea506200b4f4a0a/Shaders/ReShadeUI.fxh
@ -93,7 +94,7 @@ cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin
# include any file that doesn't get modified during setup (e.g. vkBasalt.json files)
pushd $PACKAGE_DIR
echo $XR_DRIVER_MANIFEST_LINE > manifest
sha256sum bin/breezy_vulkan_uninstall vkBasalt.64/libvkbasalt.so vkBasalt.32/libvkbasalt.so *.fx* *.png >> manifest
sha256sum bin/breezy_vulkan_uninstall vkBasalt.64/libvkbasalt.so vkBasalt.32/libvkbasalt.so *.frag *.fx* *.png >> manifest
popd
# bundle everything up

View File

@ -140,9 +140,12 @@ function setIntermittentUniformVariables() {
const halfFovYRads = halfFovZRads * displayAspectRatio;
const fovHalfWidths = [Math.tan(halfFovYRads), Math.tan(halfFovZRads)];
const fovWidths = [fovHalfWidths[0] * 2, fovHalfWidths[1] * 2];
const lensDistanceRatio = dataViewFloat(dataView, LENS_DISTANCE_RATIO);
let lensFromCenter = 0.0;
let texcoordXLimits = [0.0, 1.0];
let texcoordXLimitsRight = [0.0, 1.0];
if (sbsEnabled) {
lensFromCenter = lensDistanceRatio / 3.0;
if (sbsContent) {
texcoordXLimits[1] = 0.5;
texcoordXLimitsRight[0] = 0.5;
@ -155,8 +158,6 @@ function setIntermittentUniformVariables() {
texcoordXLimits[1] = 0.75;
}
}
const lensDistanceRatio = dataViewFloat(dataView, LENS_DISTANCE_RATIO);
const lensFromCenter = lensDistanceRatio / 3.0;
const lensVector = [lensDistanceRatio, lensFromCenter, 0.0];
const lensVectorRight = [lensDistanceRatio, -lensFromCenter, 0.0];

@ -1 +1 @@
Subproject commit 36db133a93e63fc4356902792fc5dfea1f18fb13
Subproject commit 6e455867e465d08ed815966c0e1ff6ef38274df3

@ -1 +1 @@
Subproject commit 0bc7f2ef1f63030ccedaf4f0f6c88b4ee558cb25
Subproject commit 131c91446d8d99b2d2e612fb1c5cc46fc8c9a689

View File

@ -8,7 +8,7 @@ file_paths=(
["bin/breezy_vulkan_uninstall"]="{bin_dir}/breezy_vulkan_uninstall"
["vkBasalt.64/libvkbasalt.so"]="{lib_dir}/libvkbasalt.so"
["vkBasalt.32/libvkbasalt.so"]="{lib32_dir}/libvkbasalt.so"
["IMUAdjust.fx"]="{reshade_config_dir}/Shaders/IMUAdjust.fx"
["IMUAdjust.frag"]="{reshade_config_dir}/Shaders/IMUAdjust.frag"
["ReShade.fxh"]="{reshade_config_dir}/Shaders/ReShade.fxh"
["ReShadeUI.fxh"]="{reshade_config_dir}/Shaders/ReShadeUI.fxh"
["Sideview.fx"]="{reshade_config_dir}/Shaders/Sideview.fx"

View File

@ -124,11 +124,12 @@ fi
# copy the vkBasalt.conf file and make replacements
sed -e "s|/path/to/reshade-shaders|${RESHADE_CONFIG_DIR}|" \
-e "s|/path/to/virtual_display|${RESHADE_CONFIG_DIR}/Shaders/IMUAdjust.fx|" \
-e "s|/path/to/virtual_display|${RESHADE_CONFIG_DIR}/Shaders/IMUAdjust.frag|" \
-e "s|/path/to/sideview|${RESHADE_CONFIG_DIR}/Shaders/Sideview.fx|" \
config/vkBasalt.conf > $VKBASALT_CONFIG_DIR/vkBasalt.conf
echo "Installing the Sombrero shaders and texture files to ${RESHADE_CONFIG_DIR}/{Shaders,Textures}"
cp *.frag $RESHADE_CONFIG_DIR/Shaders
cp *.fx* $RESHADE_CONFIG_DIR/Shaders
cp *.png $RESHADE_CONFIG_DIR/Textures