Core shaders for clouds are not respected
StunfMC opened this issue ยท 3 comments
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
- Go to vanillatweaks.net
- Go under the "Fixes" tab
- Choose the Cloud Fog Fix resource pack
- Download the resource pack
- Open Minecraft
- 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
Sodium 0.4.7
Both screenshots have the Vanilla Tweaks Cloud Fog Fix resource pack enabled.
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.
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.
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.