diff --git a/QCXR.patch b/QCXR.patch index 270ba77..61749fe 100644 --- a/QCXR.patch +++ b/QCXR.patch @@ -1,198 +1,70 @@ Subject: [PATCH] QCXR --- -Index: build.gradle -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/build.gradle b/build.gradle ---- a/build.gradle (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/build.gradle (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -27,10 +27,7 @@ - mappings loom.officialMojangMappings() - // The following line declares the yarn mappings you may select this one as well. - // mappings "net.fabricmc:yarn:1.18.2+build.4:v2" -- implementation("org.lwjgl:lwjgl-openvr:3.2.2") -- implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-linux") -- implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-macos") -- implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-windows") -+ implementation("org.lwjgl:lwjgl-openvr:3.3.2") - } - - tasks.withType(JavaCompile) { Index: common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java b/common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java ---- a/common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -704,6 +704,8 @@ - - try { - minecraft.mainRenderTarget = this.framebufferVrRender; +--- a/common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/java/org/vivecraft/client_vr/provider/VRRenderer.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -706,6 +706,8 @@ + ShaderHelper.checkGLError("init FOV shader"); + VRShaders.setupPortalShaders(); + ShaderHelper.checkGLError("init portal shader"); + VRShaders.setupGSR(); + ShaderHelper.checkGLError("init gsr shader"); - VRShaders.setupDepthMask(); - ShaderHelper.checkGLError("init depth shader"); - VRShaders.setupFOVReduction(); -Index: common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/MCOpenVR.java -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/MCOpenVR.java b/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/MCOpenVR.java ---- a/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/MCOpenVR.java (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/MCOpenVR.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -1078,7 +1078,7 @@ - } - - private void readPoseData(long actionHandle) { -- int i = VRInput_GetPoseActionData(actionHandle, 1, 0F, this.poseData, InputPoseActionData.SIZEOF, 0L); -+ int i = VRInput_GetPoseActionDataForNextFrame(actionHandle, 1, this.poseData, InputPoseActionData.SIZEOF, 0L); - - if (i != 0) { - throw new RuntimeException("Error reading pose data: " + getInputErrorName(i)); + minecraft.gameRenderer.checkEntityPostEffect(minecraft.getCameraEntity()); + } catch (Exception exception1) { + System.out.println(exception1.getMessage()); Index: common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java b/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java ---- a/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -7,10 +7,8 @@ - import net.minecraft.network.chat.TextComponent; - import net.minecraft.util.Tuple; - import org.lwjgl.opengl.GL11; --import org.lwjgl.openvr.HiddenAreaMesh; --import org.lwjgl.openvr.HmdMatrix44; --import org.lwjgl.openvr.OpenVR; --import org.lwjgl.openvr.VR; -+import org.lwjgl.opengl.GL21; -+import org.lwjgl.openvr.*; - import org.lwjgl.system.MemoryStack; - import org.lwjgl.system.MemoryUtil; - import org.vivecraft.client.utils.Utils; -@@ -18,6 +16,12 @@ +--- a/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/java/org/vivecraft/client_vr/provider/openvr_lwjgl/OpenVRStereoRenderer.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -18,6 +18,7 @@ import org.vivecraft.client_vr.provider.VRRenderer; import org.vivecraft.client_vr.render.RenderConfigException; import org.vivecraft.client_vr.render.RenderPass; -+import org.vivecraft.utils.VLoader; -+ -+import java.io.BufferedWriter; -+import java.io.File; -+import java.io.FileWriter; -+import java.io.IOException; ++import org.vivecraft.util.VLoader; import static org.lwjgl.openvr.VRCompositor.VRCompositor_PostPresentHandoff; import static org.lwjgl.openvr.VRCompositor.VRCompositor_Submit; -@@ -86,27 +90,80 @@ - } - - public void createRenderTexture(int lwidth, int lheight) { -+ File dmaBufFile = new File("dmabuf"); -+ if (!dmaBufFile.exists()) { -+ try { -+ dmaBufFile.createNewFile(); -+ } catch (IOException e) { -+ throw new RuntimeException(e); -+ } -+ } -+ -+ long nativeImageL = VLoader.createVKImage(lwidth, lheight, true); -+ try { -+ BufferedWriter writer = new BufferedWriter(new FileWriter("dmabuf")); -+ writer.write(Integer.toString(VLoader.getDMABuf(true))); -+ writer.flush(); -+ writer.close(); -+ } catch (IOException e) { -+ throw new RuntimeException(e); -+ } -+ - this.LeftEyeTextureId = GlStateManager._genTexture(); - int i = GlStateManager._getInteger(GL11.GL_TEXTURE_BINDING_2D); +@@ -91,7 +92,7 @@ RenderSystem.bindTexture(this.LeftEyeTextureId); RenderSystem.texParameter(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); RenderSystem.texParameter(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); - GlStateManager._texImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, lwidth, lheight, 0, GL11.GL_RGBA, GL11.GL_INT, null); -- RenderSystem.bindTexture(i); -- this.openvr.texType0.handle(this.LeftEyeTextureId); -+ GlStateManager._texImage2D(GL11.GL_TEXTURE_2D, 0, GL21.GL_RGBA8, lwidth, lheight, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, null); -+ -+ VRVulkanTextureData leftData = VRVulkanTextureData.calloc().set( -+ nativeImageL, -+ VLoader.getDevice(), -+ VLoader.getPhysicalDevice(), -+ VLoader.getInstance(), -+ VLoader.getQueue(), -+ VLoader.getQueueIndex(), -+ lwidth, -+ lheight, -+ 43, -+ 1 -+ ); -+ this.openvr.texType0.handle(leftData.address()); ++ GlStateManager._texImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, lwidth, lheight, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, null); + RenderSystem.bindTexture(i); + this.openvr.texType0.handle(this.LeftEyeTextureId); this.openvr.texType0.eColorSpace(VR.EColorSpace_ColorSpace_Gamma); -- this.openvr.texType0.eType(VR.ETextureType_TextureType_OpenGL); -+ this.openvr.texType0.eType(VR.ETextureType_TextureType_Vulkan); -+ -+ long nativeImageR = VLoader.createVKImage(lwidth, lheight, false); -+ try { -+ BufferedWriter writer = new BufferedWriter(new FileWriter("dmabuf")); -+ writer.write(Integer.toString(VLoader.getDMABuf(false))); -+ writer.flush(); -+ writer.close(); -+ } catch (IOException e) { -+ throw new RuntimeException(e); -+ } - - this.RightEyeTextureId = GlStateManager._genTexture(); -- i = GlStateManager._getInteger(GL11.GL_TEXTURE_BINDING_2D); +@@ -102,11 +103,13 @@ RenderSystem.bindTexture(this.RightEyeTextureId); RenderSystem.texParameter(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); RenderSystem.texParameter(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); - GlStateManager._texImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, lwidth, lheight, 0, GL11.GL_RGBA, GL11.GL_INT, null); -+ GlStateManager._texImage2D(GL11.GL_TEXTURE_2D, 0, GL21.GL_RGBA, lwidth, lheight, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, null); ++ GlStateManager._texImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, lwidth, lheight, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, null); RenderSystem.bindTexture(i); -- this.openvr.texType1.handle(this.RightEyeTextureId); -+ VRVulkanTextureData rightData = VRVulkanTextureData.calloc().set( -+ nativeImageR, -+ VLoader.getDevice(), -+ VLoader.getPhysicalDevice(), -+ VLoader.getInstance(), -+ VLoader.getQueue(), -+ VLoader.getQueueIndex(), -+ lwidth, -+ lheight, -+ 43, -+ 1 -+ ); -+ this.openvr.texType1.handle(rightData.address()); + this.openvr.texType1.handle(this.RightEyeTextureId); this.openvr.texType1.eColorSpace(VR.EColorSpace_ColorSpace_Gamma); -- this.openvr.texType1.eType(VR.ETextureType_TextureType_OpenGL); -+ this.openvr.texType1.eType(VR.ETextureType_TextureType_Vulkan); -+ dmaBufFile.delete(); + this.openvr.texType1.eType(VR.ETextureType_TextureType_OpenGL); ++ ++ VLoader.setEGLGlobal(); } public boolean endFrame(RenderPass eye) { -@@ -115,6 +172,7 @@ - - public void endFrame() throws RenderConfigException { - if (OpenVR.VRCompositor.Submit != 0) { -+ GL11.glFlush(); - int i = VRCompositor_Submit(0, this.openvr.texType0, null, 0); - int j = VRCompositor_Submit(1, this.openvr.texType1, null, 0); - VRCompositor_PostPresentHandoff(); Index: common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java b/common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java ---- a/common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) +--- a/common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/java/org/vivecraft/client_vr/render/VRShaders.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) @@ -34,6 +34,8 @@ public static AbstractUniform _Overlay_time; public static AbstractUniform _Overlay_BlackAlpha; @@ -221,8 +93,8 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/java/org/vivecraft/client_vr/render/helpers/VRPassHelper.java b/common/src/main/java/org/vivecraft/client_vr/render/helpers/VRPassHelper.java ---- a/common/src/main/java/org/vivecraft/client_vr/render/helpers/VRPassHelper.java (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/java/org/vivecraft/client_vr/render/helpers/VRPassHelper.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) +--- a/common/src/main/java/org/vivecraft/client_vr/render/helpers/VRPassHelper.java (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/java/org/vivecraft/client_vr/render/helpers/VRPassHelper.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) @@ -189,6 +189,11 @@ ProgramManager.glUseProgram(0); checkGLError("post overlay" + eye); @@ -241,23 +113,25 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/java/org/vivecraft/client_vr/settings/VRSettings.java b/common/src/main/java/org/vivecraft/client_vr/settings/VRSettings.java ---- a/common/src/main/java/org/vivecraft/client_vr/settings/VRSettings.java (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/java/org/vivecraft/client_vr/settings/VRSettings.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -437,11 +437,11 @@ +--- a/common/src/main/java/org/vivecraft/client_vr/settings/VRSettings.java (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/java/org/vivecraft/client_vr/settings/VRSettings.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -452,13 +452,13 @@ @SettingField(VrOptions.CHAT_MESSAGE_STENCIL) public boolean showChatMessageStencil = true; - @SettingField + @SettingField(value = VrOptions.VR_ENABLED, config = "vrEnabled") - public boolean vrEnabled = false; + public boolean vrEnabled = true; + @SettingField(VrOptions.VR_REMEMBER_ENABLED) + public boolean rememberVr = true; @SettingField(VrOptions.VR_HOTSWITCH) - public boolean vrHotswitchingEnabled = true; + public boolean vrHotswitchingEnabled = false; - @SettingField + @SettingField(value = VrOptions.VR_TOGGLE_BUTTON_VISIBLE, config = "vrToggleButtonEnabled") - public boolean vrToggleButtonEnabled = true; + public boolean vrToggleButtonEnabled = false; - @SettingField + @SettingField(value = VrOptions.VR_SETTINGS_BUTTON_VISIBLE, config = "vrSettingsButtonEnabled") public boolean vrSettingsButtonEnabled = true; - @SettingField + @SettingField(value = VrOptions.VR_SETTINGS_BUTTON_POSITION, config = "vrSettingsButtonPositionLeft") Index: common/src/main/java/org/vivecraft/mixin/client_vr/OpenVRMixin.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP @@ -265,9 +139,9 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/common/src/main/java/org/vivecraft/mixin/client_vr/OpenVRMixin.java b/common/src/main/java/org/vivecraft/mixin/client_vr/OpenVRMixin.java new file mode 100644 ---- /dev/null (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -+++ b/common/src/main/java/org/vivecraft/mixin/client_vr/OpenVRMixin.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -0,0 +1,67 @@ +--- /dev/null (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) ++++ b/common/src/main/java/org/vivecraft/mixin/client_vr/OpenVRMixin.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -0,0 +1,68 @@ +package org.vivecraft.mixin.client_vr; + +import org.lwjgl.openvr.OpenVR; @@ -298,6 +172,7 @@ new file mode 100644 + @Shadow @Nullable public static OpenVR.IVRInput VRInput; + @Shadow @Nullable public static OpenVR.IVRIOBuffer VRIOBuffer; + @Shadow @Nullable public static OpenVR.IVRSpatialAnchors VRSpatialAnchors; ++ @Shadow @Nullable public static OpenVR.IVRDebug VRDebug; + @Shadow @Nullable public static OpenVR.IVRNotifications VRNotifications; + @Shadow private static int token; + @@ -319,7 +194,7 @@ new file mode 100644 + VRChaperone = getGenericInterface(IVRChaperone_Version, OpenVR.IVRChaperone::new); + VRChaperoneSetup = getGenericInterface(IVRChaperoneSetup_Version, OpenVR.IVRChaperoneSetup::new); + VRCompositor = getGenericInterface(IVRCompositor_Version, OpenVR.IVRCompositor::new); -+ // VROverlay = getGenericInterface(IVROverlay_Version, OpenVR.IVROverlay::new); ++ VROverlay = getGenericInterface(IVROverlay_Version, OpenVR.IVROverlay::new); + // VRResources = getGenericInterface(IVRResources_Version, OpenVR.IVRResources::new); + VRRenderModels = getGenericInterface(IVRRenderModels_Version, OpenVR.IVRRenderModels::new); + VRExtendedDisplay = getGenericInterface(IVRExtendedDisplay_Version, OpenVR.IVRExtendedDisplay::new); @@ -335,31 +210,66 @@ new file mode 100644 + // VRNotifications = getGenericInterface(IVRNotifications_Version, OpenVR.IVRNotifications::new); + } +} -Index: common/src/main/java/org/vivecraft/utils/VLoader.java +Index: common/src/main/java/org/vivecraft/util/VLoader.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== -diff --git a/common/src/main/java/org/vivecraft/utils/VLoader.java b/common/src/main/java/org/vivecraft/utils/VLoader.java +diff --git a/common/src/main/java/org/vivecraft/util/VLoader.java b/common/src/main/java/org/vivecraft/util/VLoader.java new file mode 100644 ---- /dev/null (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -+++ b/common/src/main/java/org/vivecraft/utils/VLoader.java (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -0,0 +1,15 @@ -+package org.vivecraft.utils; +--- /dev/null (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) ++++ b/common/src/main/java/org/vivecraft/util/VLoader.java (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -0,0 +1,9 @@ ++package org.vivecraft.util; + +public class VLoader { + static { + System.loadLibrary("openvr_api"); + } + -+ public static native long createVKImage(int width, int height, boolean isLeft); -+ public static native int getDMABuf(boolean isLeft); -+ public static native long getInstance(); -+ public static native long getDevice(); -+ public static native long getPhysicalDevice(); -+ public static native long getQueue(); -+ public static native int getQueueIndex(); ++ public static native void setEGLGlobal(); +} +Index: common/src/main/resources/assets/minecraft/shaders/core/fovreduction.fsh +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.fsh b/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.fsh +--- a/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.fsh (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.fsh (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -2,7 +2,7 @@ + + uniform sampler2D Sampler0; + uniform float circle_radius; +-uniform float circle_offset = 0.1; ++uniform float circle_offset; + uniform float border; + + uniform float water; +@@ -22,7 +22,7 @@ + const vec4 orange = vec4(.25, .125, 0, 1.0); + const float pi = 3.14159265; + +-uniform int eye = 0; ++uniform int eye; + + void main(){ + +Index: common/src/main/resources/assets/minecraft/shaders/core/fovreduction.vsh +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.vsh b/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.vsh +--- a/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.vsh (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/resources/assets/minecraft/shaders/core/fovreduction.vsh (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -7,5 +7,5 @@ + out vec2 texCoordinates; + void main() { + gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); +- texCoordinates = UV0; ++ texCoordinates = vec2(UV0.s, 1.0 - UV0.t); + } Index: common/src/main/resources/assets/minecraft/shaders/core/gsr.fsh IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP @@ -367,10 +277,10 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/common/src/main/resources/assets/minecraft/shaders/core/gsr.fsh b/common/src/main/resources/assets/minecraft/shaders/core/gsr.fsh new file mode 100644 ---- /dev/null (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -+++ b/common/src/main/resources/assets/minecraft/shaders/core/gsr.fsh (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) +--- /dev/null (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) ++++ b/common/src/main/resources/assets/minecraft/shaders/core/gsr.fsh (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) @@ -0,0 +1,142 @@ -+#version 460 core ++#version 450 core + +//============================================================================================================ +// @@ -519,9 +429,9 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/common/src/main/resources/assets/minecraft/shaders/core/gsr.json b/common/src/main/resources/assets/minecraft/shaders/core/gsr.json new file mode 100644 ---- /dev/null (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -+++ b/common/src/main/resources/assets/minecraft/shaders/core/gsr.json (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -0,0 +1,35 @@ +--- /dev/null (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) ++++ b/common/src/main/resources/assets/minecraft/shaders/core/gsr.json (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -0,0 +1,23 @@ +{ + "blend": { + "func": "add", @@ -533,7 +443,7 @@ new file mode 100644 + "attributes": ["Position", "UV0"], + "samplers": [ + { -+ "name": "DiffuseSampler" ++ "name": "Sampler0" + } + ], + "uniforms": [ @@ -542,18 +452,6 @@ new file mode 100644 + "type": "float", + "count": 4, + "values": [0.0, 0.0, 1.0, 1.0] -+ }, -+ { -+ "name": "projection", -+ "type": "matrix4x4", -+ "count": 16, -+ "values": [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0] -+ }, -+ { -+ "name": "modelView", -+ "type": "matrix4x4", -+ "count": 16, -+ "values": [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0] + } + ] +} @@ -563,8 +461,8 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/resources/assets/vivecraft/input/oculus_defaults.json b/common/src/main/resources/assets/vivecraft/input/oculus_defaults.json ---- a/common/src/main/resources/assets/vivecraft/input/oculus_defaults.json (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/resources/assets/vivecraft/input/oculus_defaults.json (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) +--- a/common/src/main/resources/assets/vivecraft/input/oculus_defaults.json (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/resources/assets/vivecraft/input/oculus_defaults.json (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) @@ -142,7 +142,7 @@ } }, @@ -682,8 +580,8 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/resources/assets/vivecraft/input/vive_defaults.json b/common/src/main/resources/assets/vivecraft/input/vive_defaults.json ---- a/common/src/main/resources/assets/vivecraft/input/vive_defaults.json (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/resources/assets/vivecraft/input/vive_defaults.json (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) +--- a/common/src/main/resources/assets/vivecraft/input/vive_defaults.json (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/resources/assets/vivecraft/input/vive_defaults.json (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) @@ -146,15 +146,12 @@ }, { @@ -914,33 +812,48 @@ diff --git a/common/src/main/resources/assets/vivecraft/input/vive_defaults.json "options": {}, "simulated_actions": [] } +Index: common/src/main/resources/vivecraft.accesswidener +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/common/src/main/resources/vivecraft.accesswidener b/common/src/main/resources/vivecraft.accesswidener +--- a/common/src/main/resources/vivecraft.accesswidener (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/resources/vivecraft.accesswidener (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -6,6 +6,8 @@ + accessible field net/minecraft/client/model/geom/ModelPart cubes Ljava/util/List; + accessible field net/minecraft/client/model/geom/ModelPart$Cube polygons [Lnet/minecraft/client/model/geom/ModelPart$Polygon; + ++accessible class com/mojang/blaze3d/systems/RenderSystem$AutoStorageIndexBuffer$IndexGenerator ++ + # custom player modle rendering + accessible field net/minecraft/client/model/PlayerModel slim Z + extendable method net/minecraft/client/renderer/entity/player/PlayerRenderer setModelProperties (Lnet/minecraft/client/player/AbstractClientPlayer;)V Index: common/src/main/resources/vivecraft.mixins.json IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/common/src/main/resources/vivecraft.mixins.json b/common/src/main/resources/vivecraft.mixins.json ---- a/common/src/main/resources/vivecraft.mixins.json (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/common/src/main/resources/vivecraft.mixins.json (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -70,7 +70,8 @@ - "client_vr.world.PotionItemVRMixin", - "client_vr.world.entity.player.PlayerVRMixin", - "client_vr.world.entity.projectile.FireworkRocketEntityVRMixin", -- "client_vr.world.level.biome.BiomeAccessor" -+ "client_vr.world.level.biome.BiomeAccessor", -+ "client_vr.OpenVRMixin" - ], - "minVersion": "0.8.4", - "mixins": [ +--- a/common/src/main/resources/vivecraft.mixins.json (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/common/src/main/resources/vivecraft.mixins.json (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -27,6 +27,7 @@ + "client_vr.KeyboardInputVRMixin", + "client_vr.MinecraftVRMixin", + "client_vr.MouseHandlerVRMixin", ++ "client_vr.OpenVRMixin", + "client_vr.OptionsVRMixin", + "client_vr.blaze3d.audio.LibraryVRMixin", + "client_vr.blaze3d.platform.GlStateManagerVRMixin", Index: fabric/build.gradle IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/fabric/build.gradle b/fabric/build.gradle ---- a/fabric/build.gradle (revision 13f2f5122fdc2179a5dba6dfbab9eaf70c7e6190) -+++ b/fabric/build.gradle (revision 909f0daec70f8b04057383d14e2f2c0c0427db7b) -@@ -79,10 +79,10 @@ +--- a/fabric/build.gradle (revision d560a9e39013cfb446453e34edf995f66f21af61) ++++ b/fabric/build.gradle (revision 2220a37798f0d87c1f04c8fcc8e9926113e3bdd8) +@@ -62,10 +62,10 @@ include(implementation('com.electronwill.night-config:toml:3.6.6')) include(implementation('com.electronwill.night-config:core:3.6.6')) @@ -948,10 +861,10 @@ diff --git a/fabric/build.gradle b/fabric/build.gradle - include(implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-linux")) - include(implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-macos")) - include(implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-windows")) -+ include(implementation("org.lwjgl:lwjgl-openvr:3.3.2")) -+ // include(implementation("org.lwjgl:lwjgl-openvr:3.3.1:natives-linux")) -+ // include(implementation("org.lwjgl:lwjgl-openvr:3.3.1:natives-macos")) -+ // include(implementation("org.lwjgl:lwjgl-openvr:3.3.1:natives-windows")) ++ include(implementation("org.lwjgl:lwjgl-openvr:3.2.2")) ++ // include(implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-linux")) ++ // include(implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-macos")) ++ // include(implementation("org.lwjgl:lwjgl-openvr:3.2.2:natives-windows")) }