CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.77k stars 811 forks source link

Block models causing a saturation problem on blocks. #2787

Closed Borous closed 3 weeks ago

Borous commented 3 weeks ago

Bug Description

With the latest version of Sodium, sodium-fabric-0.6.0-beta.2+mc1.21.1, there occurs a strange issue wherein when using a resource pack to add models to a block --such as bushy leaves from vanilla tweaks-- it amps up the saturation of the block significantly. Difference can be seen below: Bug

Reproduction Steps

To reproduce this issue; Use sodium-fabric-0.6.0-beta.2+mc1.21.1, then load any resourcepack making use of block models on seemingly transparent blocks. VanillaTweaks_r434121_MC1.21.x.zip

Log File

No Such File available.

Crash Report

No Such File available.

jellysquid3 commented 3 weeks ago

The brightness in both screenshots doesn't appear to be the same, as seen in other blocks (especially the stone.) Are you sure that both screenshots were taken at the same time of day and brightness level?

Sodium also uses a better energy-conserving function in texture processing, which makes a difference. In Minecraft (the leftmost screenshot) you can see that the extra geometry is a different brightness from the leaf block itself, where as in Sodium they are consistent.

Borous commented 3 weeks ago

It is taken at more or less the exact time of day, I noticed the difference immediately after updating to the aforementioned version of Sodium

MeeniMc commented 3 weeks ago

From my own testings, the color with Sodium+Bushy-leaves is close to the color without bushy-leaves. Do you also see a deviation in color between vanilla+bushy and pure vanilla?

Borous commented 3 weeks ago

difference I went and quickly tested it!, on the left Vanilla, on the right Sodium,

jellysquid3 commented 3 weeks ago

Some difference is to be expected since we use an alternative approach to generating mip-maps (which is higher quality and preserves brightness.) We don't intend to change this behavior, since doing so would regress many other textures.

If you do not like this behavior, you can modify the textures within the resource pack so that transparent pixels have a (darker) color value assigned, and instead are very slightly opaque (alpha of <10). That will bias the generation of mip-maps to have darker colors like you expect.