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

Item models with two or more texture layers have extra internal planes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.1, 24w37a
    • None
    • Confirmed
    • Textures and models

      The bug

      If an item uses two textures combined together for its appearence, those two layers will be rendered in full, not accounting for cases where some geometry would never be visible from outside. This results in extra faces being rendered for no reason, causing potential render lag.

      Potions, leather armor, spawn eggs, firework stars, trimmed armor and used maps are affected; in the case of trimmed armor and maps this causes extra internal Z-fighting.

      How to reproduce

      1. Obtain one of these items
      2. Drop it on the ground or (excluding maps) put it in an item frame
      3. Clip inside of the item model

      Expected results

      Where one layer meets another, there would be no extra planes inside.

      Actual results

      There are.

      How to fix

      For the specific case of potions available in Survival, it may be worth abandoning the "base and inner with tint" system, and instead giving each potion its own texture file without a tint, meaning only one texture file needs to be rendered for each potion. This may happen in future: https://twitter.com/kingbdogz/status/1631006850282934289

      However, if custom potions still exist, the two-layer system will probably be kept, and the issue will be localized to there. It will not be a Survival problem, but another solution may be required here.

        1. 2024-09-13_12.34.42.png
          2024-09-13_12.34.42.png
          152 kB
        2. 2024-09-13_12.34.53.png
          2024-09-13_12.34.53.png
          162 kB
        3. 2024-09-13_12.34.59.png
          2024-09-13_12.34.59.png
          163 kB
        4. 2024-09-13_12.35.04.png
          2024-09-13_12.35.04.png
          166 kB
        5. 2024-09-13_12.35.12.png
          2024-09-13_12.35.12.png
          123 kB
        6. 2024-09-13_12.37.50.png
          2024-09-13_12.37.50.png
          150 kB
        7. 2024-09-13_12.37.55.png
          2024-09-13_12.37.55.png
          37 kB
        8. 2024-09-13_12.39.28.png
          2024-09-13_12.39.28.png
          203 kB
        9. 2024-09-13_12.39.34.png
          2024-09-13_12.39.34.png
          108 kB
        10. 2024-09-13_12.39.39.png
          2024-09-13_12.39.39.png
          52 kB
        11. 2024-09-13_12.45.02.png
          2024-09-13_12.45.02.png
          19 kB
        12. 2024-09-13_12.45.22.png
          2024-09-13_12.45.22.png
          17 kB
        13. 2024-09-15_16.46.20.png
          2024-09-15_16.46.20.png
          19 kB

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

              Created:
              Updated:
              CHK: