Skip to content

Enable Flywheel's optimizations when using shaderpacks.

License

Notifications You must be signed in to change notification settings

jam-jar-binks/iris-flw-compat-ocu-fix

 
 

Repository files navigation

Logo

Iris & Oculus Flywheel Compat
CF Supported Versions License

Iris & Oculus Flywheel Compat

Allow Flywheel instancing optimization to be enabled when using iris.

Principle

Flywheel uses a method called GPU Instancing to render entities. It is very efficient when rendering a large number of repeating entities (e.g. gears in Create mod). But when you use iris and enable shaderpack, this optimization is disabled. Because flywheel needs to use its own shader to render these entities and flywheel's shader will no longer work when you enable shaderpack.

This mod will automatically merge flywheel's shader with the shader in shaderpack when shaderpack is enabled to be able to render entities using Instancing.

When you have a large number of entities to render, there is a huge CPU bottleneck with the original rendering method.

Implementation details

This mod replaces the ProgramCompiler::getProgram method. When Flywheel trys to generate shaders, this mod will merge the shader generated by flywheel with the gbuffer_block shader in the shaderpack.

Credit

This project uses the glsl-transformer to transformer the shaders.

About

Enable Flywheel's optimizations when using shaderpacks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%