Skip to content

[1.16] Add Iris/Oculus shader detection to renderer compatibility handling - #348

Open
suke-maboroshi wants to merge 1 commit into
Engine-Room:1.16/devfrom
suke-maboroshi:fix/oculus-iris-shader-detection
Open

suke-maboroshi wants to merge 1 commit into
Engine-Room:1.16/devfrom
suke-maboroshi:fix/oculus-iris-shader-detection

Conversation

@suke-maboroshi

Copy link
Copy Markdown

Summary

This PR adds Iris/Oculus shader-state detection to Flywheel's renderer compatibility handling.

Iris/Oculus does not use OptiFine's net.optifine package, so the existing shader detection did not recognize it. As a result, Flywheel could perform OpenGL program state resets while an Iris/Oculus shader pack was active, causing repeated OpenGL errors such as GL_INVALID_OPERATION: No active program.

Changes

  • Detect the Iris API (net.irisshaders.iris.api.v0.IrisApi) using reflection, keeping Iris/Oculus an optional dependency.
  • Query isShaderPackInUse() when checking whether Flywheel's rendering backends can be used.
  • Treat shader state as active if the Iris API is present but cannot be queried, to avoid interfering with the shader pipeline.
  • Update the renderer compatibility message to refer to shader packs rather than OptiFine shaders specifically.

Testing

Tested with:

  • Minecraft 1.16.5
  • Forge 36.2.34
  • Oculus 1.4.8
  • Embeddium 0.3.18
  • Complementary Reimagined r5.8.1

The OpenGL error spam was reproduced with shaders enabled and no longer occurred after applying this change.

Notes

This change does not add Flywheel instancing support while Iris/Oculus shaders are active. Instead, it disables the affected Flywheel rendering backends while shaders are in use, following the existing conservative compatibility approach.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant