leon-o / iris-flw-compat

Enable Flywheel's optimizations when using shaderpacks.
MIT License
46 stars 24 forks source link

Reserve the Create shadow volume sampler in Iris #86

Closed branan closed 8 months ago

branan commented 9 months ago

Create hardcodes sampler '4' for its contraption shader, to render light volumes.

Fortunately, Iris has a pretty robust system in place to handle samplers used by other parts of the system.

This hooks the Iris sampler setup to inject the sampler '4', ensuring that Iris will not attempt to use that sampler for its own purposes.

Fixes #59

branan commented 9 months ago

For folks to be able to apply this on top of Create Astral (as referenced in #59), I think it would need to be ported to the 1.18.2-iris1.6 branch (that's what I patched and am running locally, at any rate).

In theory it should cherry-pick cleanly to all the minecreft+iris branches you currently have - Iris hasn't changed that code since at least going back to 1.4.