ckosmic / minecraft-psx

PlayStation 1 shaders for Minecraft
MIT License
78 stars 7 forks source link

Added Iris compatibility (albeit without texture affine map clamping), overhauled README.md documentation. #4

Closed akemin-dayo closed 2 years ago

akemin-dayo commented 2 years ago

This PR adds Iris compatibility (fixing #3), but with texture affine map clamping disabled by default for all users, even those that are using OptiFine.

I've also rewritten and improved the README.md documentation.

Unfortunately, I am not currently aware if there is any way for us to determine from GLSL code whether we're running on Iris or OptiFine — if there is, it would be ideal to disable texture affine map clamping by default only for Iris users, but leave it enabled by default for OptiFine users.

※ Iris developers have confirmed that such a thing is impossible, and that they heavily discourage trying to do anything like that.

ckosmic commented 2 years ago

Nice. I've made a temporary fix to affine map clamping while Iris figures out custom uniforms which should unify OptiFine/Iris a bit more. Hopefully they can add that feature soon because it's pretty important for other shaderpacks as well.

Let me know what you think of my changes.

(Also your tweak AppSync Unified is great, made my life so much easier when I tried iOS dev)

akemin-dayo commented 2 years ago

Just pulled the latest changes, can confirm that affine map clamping now works on Iris, with behaviour matching that of OptiFine's.

I can also confirm that there are no regressions caused by this change on OptiFine.

(※ Tested on NVIDIA RTX 2060 (512.95) and Apple G13J.)

The only remaining Iris-specific parity quirk now is the fact that texture affine mapping behaviour somehow ends up warping in the completely opposite direction on Iris… but that's really minor and is quite literally not noticeable without comparing OptiFine/Iris screenshots back and forth, so I don't think that should be a blocker for release/merge.


Hopefully they can add that feature soon because it's pretty important for other shaderpacks as well.

Yeah, this breaks some nice-to-have features on other shader packs, including the main one I use (a private modification of Sildur's Vibrant Extreme). Specifically, SVE determines whether or not to draw terrain rain reflections based on a custom BiomeTemp uniform in order to avoid drawing rain reflections on terrain in dry biomes where it doesn't rain (such as desert biomes).

But since Iris doesn't support custom uniforms yet, this means terrain rain reflections are completely broken on Iris by default, requiring the user to disable the biome dryness check if they want rain reflections (but at the cost of making desert biomes appear wet during stormy weather l o l)


(Also your tweak AppSync Unified is great, made my life so much easier when I tried iOS dev)

Glad that it was helpful! c: It's always nice to hear from people who benefited in some way from the things you make.


※ EDIT: Also, I updated the wording on the known issue regarding text legibility to make it clearer / more informative.