Sodium

Sodium

35M Downloads

Core shaders for clouds are not respected

StunfMC opened this issue ยท 3 comments

commented

Version information

1.19.3-0.4.7+build.21

Expected Behavior

The clouds should not show in the fog.

Actual Behavior

The clouds show in the fog and ignore the resource pack fix.

Reproduction Steps

  1. Go to vanillatweaks.net
  2. Go under the "Fixes" tab
  3. Choose the Cloud Fog Fix resource pack
  4. Download the resource pack
  5. Open Minecraft
  6. Enable the resource pack

Java version

Java 17

CPU

i9-12900k

GPU

RTX 3060

Additional information

This is caused by the optimized cloud rendering added in Sodium 0.4.7. Making this a toggle in the settings for 0.4.6 and below cloud rendering can fix this issue if it is not possible to fix otherwise.

Sodium 0.4.6

2022-12-30_17 31 09

Sodium 0.4.7

2022-12-30_17 27 24

Both screenshots have the Vanilla Tweaks Cloud Fog Fix resource pack enabled.

commented

This is because cloud fog was rewritten internally in 0.4.7 which broke compatibility with the resource pack. I don't know how friendly Sodium is with fixing issues like this, but they break a lot of resource pack options already and it's likely that this wouldn't be fixed.

But now we know the route cause it is possible for a fix to be implemented or patched.

commented

I meant to respond to this issue the other day but I guess it slipped from me. You can add the following item to your sodium-mixins.properties file (in the config folder) to disable the cloud rendering patch.

mixin.features.clouds=false

The reason is as Mistrk7 points out... we rewrote cloud rendering quite significantly (a 5-10% performance improvement on a lot of machines, even with the much greater cloud render distance), and it goes through Sodium's own code paths that, much like terrain rendering, is completely incompatible with vanilla resource packs.

Unfortunately, "core shader" replacement like these resource packs are doing will never be properly supported in Sodium. We simply cannot uphold the shader interface that these resource packs are written around, and even Mojang doesn't support patching them in the first place. The only way to make this work would be for their authors to write custom shaders just for Sodium.

commented

We're not going to fix problems with core shaders breaking when using Sodium. However, it should be possible in a future version (maybe Sodium 0.5 with the GFX rendering code?) to replace this specific shader in Sodium. The resource pack would just need to provide an asset in the sodium domain and make sure it conforms to our own interface.