File tree Expand file tree Collapse file tree
common/src/main/java/org/vivecraft/mod_compat_vr/iris Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public class IrisHelper {
4141 private static Method CapturedRenderingState_getGbufferProjection ;
4242
4343 private static Method WorldRenderingSettings_setUseExtendedVertexFormat ;
44+ private static Method WorldRenderingSettings_shouldUseExtendedVertexFormat ;
4445
4546 public static boolean isIrisLoaded () {
4647 return Xplat .isModLoaded ("iris" ) || Xplat .isModLoaded ("oculus" );
@@ -83,7 +84,11 @@ public static boolean hasWaterEffect() {
8384 }
8485
8586 public static boolean isShaderActive () {
86- return IrisApi .getInstance ().isShaderPackInUse ();
87+ try {
88+ return IrisApi .getInstance ().isShaderPackInUse () || (WorldRenderingSettings_shouldUseExtendedVertexFormat != null && (boolean ) WorldRenderingSettings_shouldUseExtendedVertexFormat .invoke (WorldRenderingSettings .INSTANCE ));
89+ } catch (InvocationTargetException | IllegalAccessException e ) {
90+ return false ;
91+ }
8792 }
8893
8994 public static boolean hasIssuesWithMenuWorld () {
@@ -164,6 +169,7 @@ private static boolean init() {
164169
165170 try {
166171 WorldRenderingSettings_setUseExtendedVertexFormat = Class .forName ("net.irisshaders.iris.shaderpack.materialmap.WorldRenderingSettings" ).getMethod ("setUseExtendedVertexFormat" , boolean .class );
172+ WorldRenderingSettings_shouldUseExtendedVertexFormat = Class .forName ("net.irisshaders.iris.shaderpack.materialmap.WorldRenderingSettings" ).getMethod ("shouldUseExtendedVertexFormat" );
167173 } catch (ClassNotFoundException | NoSuchMethodException ignore ) {}
168174
169175 // distant horizon compat
You can’t perform that action at this time.
0 commit comments