Closed GeForceLegend closed 1 month ago
This is not a bug, and core shaders are not supported.
Sodium interprets fully-transparent pixels as having no color data, and replaces them with an averaged color of the non-transparent pixels. For certain blocks, we replaced the textures so that empty parts of the texture are not quite fully transparent, so that color values are not replaced.
This does NOT match vanilla behavior, as those part in vanilla leaves are pure dark when graphics is set to fast. It doesn't make any sense replacing fully transparent pixels of leaves with avg color.
The problem is that most resource packs (including Minecraft itself) are created with image editors that discard the color values of fully transparent pixels. This causes problems with mip-mapping, since when the image is downscaled, these pixels (which are usually #000000) get blended with their neighbors.
For the example of leaf blocks, this makes them appear too dark in-game, when the texture itself is much brighter. Additionally, you can notice that grass blocks when viewed from the side are blackened across the edges.
I understand that we are deviating from the behavior of Minecraft, but that is intentional. We would prefer to fix the graphical bugs which are caused by this problem, rather than maintain exact compatibility with core shaders.
There is more information that can be read here about the problem.
So does it possible to save the range of leave textures, and edit them after merging into atlas texture? This can make alpha channel stay in 0.0 but not 1.0 / 255.0
Bug Description
Alpha channel of certain block texture has a strange
1.0 / 255.0
value in atlas texture, even though in raw texture it's alpha is 0.0. This may affect transparent object detection in shaders, or something more.Reproduction Steps
sodium-fabric-0.6.0-beta.1+mc1.21.jar
mod. I'll use vanilla resourcepack shaders but not OF shaders to show this issue to prevent Iris' influence.1.0 / 255.0
alpha turns red. SodiumAlphaTest.zip1.0 / 255.0
. Maybe there are more blocks affected.Log File
Nothing useful in log. Only used Sodium mod and provided resourcepack.
Crash Report
No crash.