Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-241035

Sun texture treats darkness as transparency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 21w44a, 1.18 Pre-release 1, 1.19, 1.20.6
    • Confirmed
    • Resource Packs
    • Low
    • Platform

      The bug

      The sun texture treats darker pixels as more translucent instead of treating them as darker and using the alpha channel to track translucency, preventing the use of dark colors in the sun texture in resource packs.

      The moon is currently untested but is likely also affected.

      Given historical changes to textures throughout the updates, such as banner patterns in 1.15 (see https://www.minecraft.net/en-us/article/minecraft-snapshot-19w39a), it appears that this practice is not entirely accepted, and is being phased out somewhat, with the sun being one of few leftover cases.

      That being said, the current handling (linear dodge blending) gives a special visual effect which cannot be faithfully recreated via the use of alpha, and therefore it might be better if the sun texture and its rendering were left as is.

      How to reproduce

      1. Download and apply the sun testing resource pack attached to this ticket (also feel free to extract it and examine the contained texture in more detail to allow for a point of comparison between the file and its in-game appearance)
      2. Look at the sun
      3. Note that the "black" and "clear" lines both appear to be the exact same "color" - that is, completely see-through.

      Expected results

      The word "black" would appear black, and only "clear" would appear transparent. In addition, "white" would be visible due to it also being a part of the texture.

      Actual results

      Black and clear are both transparent and white is invisible against the image background.

      How to fix

      The sun texture file should be made translucent accordingly (don't forget Programmer Art!) so it renders as translucent in-game, and this "darker is more transparent" rendering method deprecated from it.

      Further notes

      If the moon is also found to be subject to this rendering method, it might be a good idea to it only deprecate it from that as well, but split the moon phases file into individual textures as has been done with other atlases, and then stitch those eight phases plus the sun into a new texture atlas: celestial_bodies.png-atlas

        1. 2021-11-09_15.56.44.png
          40 kB
          Connor Steppie
        2. 2021-11-09_16.06.40.png
          29 kB
          Connor Steppie
        3. 2022-06-12_13.10.58-1.png
          135 kB
          Connor Steppie

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            9 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: