This PR adds a Flywheel backend to Celeritas, used when shaders are enabled. The backend is heavily derived from Colorwheel. Performance of Flywheel rendering should be essentially identical to Colorwheel since nothing was really changed there. This adds a rather significant amount of code, albeit isolated to its own module. The benefit is that Create is no longer extremely slow to use with shaders. Assorted notes on design choices etc follow.
Why Colorwheel is integrated in-tree instead of forked: first of all, we do not have a sufficient public API surface for something like Colorwheel to be implemented entirely externally. Building that is currently more effort than it's worth, especially since a replacement for the Iris-derived shader support remains on the roadmap.
Second, the fork would require nontrivial changes to handle cases where our internals have diverged from Iris, and to rewrite usages of the effectively proprietary glsl-transformer. These would then need to be rebased for every upstream change and Celeritas change. With the code in-tree, Celeritas refactors are handled immediately as always. Upstream's commit rate is not that high, so it should be fairly low effort to keep up with. In terms of OSS friendliness, this work has already led to a couple upstream fixes being sent: https://github.com/djefrey/Colorwheel/pull/87
Why I am willing to do this at all: Flywheel has become fairly standard on these versions for efficient instanced rendering, and is now used by several mods, not just Create. Create is also included in a significant majority of modpacks for these versions.
Unlike Colorwheel, we support only Flywheel 1.0.6+, mostly for simplicity. 1.20.1 users will have to download a newer Flywheel jar and add it to mods/ manually, since the last official Create release ships with 1.0.2.
This PR adds a Flywheel backend to Celeritas, used when shaders are enabled. The backend is heavily derived from Colorwheel. Performance of Flywheel rendering should be essentially identical to Colorwheel since nothing was really changed there. This adds a rather significant amount of code, albeit isolated to its own module. The benefit is that Create is no longer extremely slow to use with shaders. Assorted notes on design choices etc follow.
Why Colorwheel is integrated in-tree instead of forked: first of all, we do not have a sufficient public API surface for something like Colorwheel to be implemented entirely externally. Building that is currently more effort than it's worth, especially since a replacement for the Iris-derived shader support remains on the roadmap.
Second, the fork would require nontrivial changes to handle cases where our internals have diverged from Iris, and to rewrite usages of the effectively proprietary glsl-transformer. These would then need to be rebased for every upstream change and Celeritas change. With the code in-tree, Celeritas refactors are handled immediately as always. Upstream's commit rate is not that high, so it should be fairly low effort to keep up with. In terms of OSS friendliness, this work has already led to a couple upstream fixes being sent: https://github.com/djefrey/Colorwheel/pull/87
Why I am willing to do this at all: Flywheel has become fairly standard on these versions for efficient instanced rendering, and is now used by several mods, not just Create. Create is also included in a significant majority of modpacks for these versions.
Unlike Colorwheel, we support only Flywheel 1.0.6+, mostly for simplicity. 1.20.1 users will have to download a newer Flywheel jar and add it to `mods/` manually, since the last official Create release ships with 1.0.2.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR adds a Flywheel backend to Celeritas, used when shaders are enabled. The backend is heavily derived from Colorwheel. Performance of Flywheel rendering should be essentially identical to Colorwheel since nothing was really changed there. This adds a rather significant amount of code, albeit isolated to its own module. The benefit is that Create is no longer extremely slow to use with shaders. Assorted notes on design choices etc follow.
Why Colorwheel is integrated in-tree instead of forked: first of all, we do not have a sufficient public API surface for something like Colorwheel to be implemented entirely externally. Building that is currently more effort than it's worth, especially since a replacement for the Iris-derived shader support remains on the roadmap.
Second, the fork would require nontrivial changes to handle cases where our internals have diverged from Iris, and to rewrite usages of the effectively proprietary glsl-transformer. These would then need to be rebased for every upstream change and Celeritas change. With the code in-tree, Celeritas refactors are handled immediately as always. Upstream's commit rate is not that high, so it should be fairly low effort to keep up with. In terms of OSS friendliness, this work has already led to a couple upstream fixes being sent: https://github.com/djefrey/Colorwheel/pull/87
Why I am willing to do this at all: Flywheel has become fairly standard on these versions for efficient instanced rendering, and is now used by several mods, not just Create. Create is also included in a significant majority of modpacks for these versions.
Unlike Colorwheel, we support only Flywheel 1.0.6+, mostly for simplicity. 1.20.1 users will have to download a newer Flywheel jar and add it to
mods/manually, since the last official Create release ships with 1.0.2.