X0nk / Bliss-Shader

A minecraft shader which is an edit of chocapic v9
Other
478 stars 26 forks source link

[INFO] Apple devices fail to load the shader #181

Open X0nk opened 1 month ago

X0nk commented 1 month ago

Writing this for all apple related complaints about the shader. This thread is open to discussion. so feel free to talk if you have something to say!

Distant Horizons + Bliss will not work on Apple devices

if you want distant horizons + shaders, not all shaders suffer from the same problems as Bliss. i recommend going to modrinth and downloading a shader that can work on mac with distant horizons - like complementary, BSL, or Photon.

Why does this happen?

Apple hates openGL. They have terrible support for openGL compared to every vendor, and sometimes have arbitrary limits on things they do support. Making the shader work around these limits/lack of support is frankly very annoying, and lots of times require parts of the shader to be rewritten in a different way, or disabled entirely.

2 common issues that happen on apple devices when using bliss:

To fix these 2 problems, i would have to re-manage how all the data is encoded/managed and then decoded/read in the main lighting pass. it is admittedly bad right now, but i probably wont address this any time soon. all this data is used across the entire shader pretty much, so it would be a good bit of work.

Can bliss even function at all on apple devices???

Yes. without distant horizons, and with default, stock shader settings should work.

GroxDots commented 1 month ago

So here are the settings that I think are giving the memory channel issue: Colored shadows RP sky SSR in Specular Reflections indirect lighting when it is set to SSGI Clouds intersect terrain DH support Biome Tinted Water.

Aerochrome Mode is also broken and is giving me this error: net.minecraft.class_2973: Invalid shaders/core/terrain_solid.json: The call method_34416 is not cancellable.

Update as of June 15, 2024: Aerochome Mode, Biome Tinted Water and Clouds intersect terrain work now.

ghost commented 1 month ago

Turning off colored shadows allows the shader to load normally, but without Distant Horizons. While the shaders work well, the game is extremely laggy and nearly unplayable. I'm using an M3 iMac. However, when Distant Horizons is added, turning off colored shadows does not work, and the Bliss shader fails to load. Here is the information provided after the shader fails to load with Distant Horizons enabled:

composite2: composite2: WARNING: Could not find vertex shader attribute 'at_tangent' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'mc_midTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'UV0' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'iris_Entity' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'at_midBlock' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'mc_Entity' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'zMults' not read by fragment shader
WARNING: Output of vertex shader 'iris_FogFragCoord' not read by fragment shader
ERROR: Implementation limit of 16 active fragment shader samplers (e.g., maximum number of supported image units) exceeded, fragment shader uses 17 samplers
X0nk commented 1 month ago

i guess I should have been more specific about that. you simply cannot use bliss and distant horizons. the stuff used to support distant horizons itself are going over apples sampler limit.

ghost commented 1 month ago

Okay, I understand. At least it works, and that's what's important. Thank you, I appreciate your hard work.

X0nk commented 1 month ago

also i should say, if you are using the shader at native resolution, it will run horribly. i know apple devices usually have pretty high resolution screens. if that is the case, fall down to 1080p, or use the temporal upscaler in shader settings -> post processing -> anti aliasing

ghost commented 1 month ago

Wow, that makes a huge difference! I can finally enjoy the shaders at a full frame rate, thank you so much!

chair-man-f commented 1 month ago

unfortunate, maybe with this new game porting toolkit thing they should fix opengl

are you still working on the glowing entities thing ?

GroxDots commented 1 month ago

unfortunate, maybe with this new game porting toolkit thing they should fix opengl

are you still working on the glowing entities thing ?

It is fixed on my end. Try on yours.

GroxDots commented 1 month ago

Wow, that makes a huge difference! I can finally enjoy the shaders at a full frame rate, thank you so much!

I would recommend using Sodium Extra. It has a feature to half the native resolution of a Mac. Try it, I give a very good result.

X0nk commented 1 month ago

the glowing entities bug has been fixed.

chair-man-f commented 1 month ago

oh ok nice

chair-man-f commented 1 month ago

what happened to render clouds as fog?

X0nk commented 1 month ago

i explained it to someone else in issue 186

chair-man-f commented 1 month ago

ok 👌

ghost commented 1 month ago

Is there a reason why stock shader settings should work if you turn off translucent colored shadows shader settings -> direct light -> shadows was removed from the post?

For me, Bliss shaders didn't work at all with the default settings until I followed this suggestion and turned off translucent colored shadows in the shader settings.

X0nk commented 1 month ago

i have changed the default state of that setting to off, so i removed the unnecessary instructions.

ghost commented 1 month ago

Ah okay, I see.

ghost commented 1 month ago

I have an idea, even though I'm not sure it can be implemented without proper support from Iris or Sodium.

As we know, Sodium, Iris and other OpenGL-based renderers and mods don't perform well on Macs because Apple doesn't fully support OpenGL.

However, MoltenGL enables OpenGL to run natively on Apple devices by leveraging the native Metal API. This can significantly improve performance on macOS devices, especially those with Apple Silicon.

This is evident from MoltenVK's use in the VulkanMod, which achieves impressive frame rates and very high view distances on Macs with Apple Silicon.

Also, incorporating MoltenGL into Iris and other optimization mods that work with Sodium, after proper collaboration between developers, could similarly result in substantial performance improvements for Minecraft shaders on macOS, leading to exceptional optimization for the game.

Is this possible?

Edit: Sodium developer said that MoltenGL is not free and open source like MoltenVK and that it requires an expensive license, something I didn't know before creating this comment.

corgi924 commented 1 month ago

I have 2 question! Pls reply me as soon as possible!

  1. Can Bliss shader run smoothly on Macbook Pro M1? (I use TL Legacy launcher and I play Minecraft 1.21 and 1.20.6. Two version of Minecraft that I mentioned above is both Fabric and both are used Iris 1.7.1).
  2. Can Bliss shader run smoothly with distant horizon on Macbook Pro M1? Again Pls Reply me As Soon As Possible!!! Thank You!❤️
ghost commented 1 month ago

I have 2 question! Pls reply me as soon as possible!

  1. Can Bliss shader run smoothly on Macbook Pro M1? (I use TL Legacy launcher and I play Minecraft 1.21 and 1.20.6. Two version of Minecraft that I mentioned above is both Fabric and both are used Iris 1.7.1).

  2. Can Bliss shader run smoothly with distant horizon on Macbook Pro M1?

                          Again Pls Reply me As Soon As Possible!!! Thank You!❤️
  1. Why don't you install it and try it?

  2. If you read this post, you will know that Bliss currently doesn't work with Distant Horizons on Mac.