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

Translucent objects are rendered out of order when not using Fabulous! graphics


    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.16.5, 21w08b, 1.18, 1.18.2, 1.19.2, 22w46a
    • Confirmed
    • Rendering

      Below is a snippet of decompiled 1.16.4 game code, which I annotated by hand:

      // If the transparency shader is defined (fabulous graphis or better)
        if (this.transparencyShader != null) {
        // Draw lines to the buffer (entity and block entity stuff)
        // Compatibility stuff
        // Start rendering translucents (water, stained glass, slime, honey, etc)
          this.renderLayer(RenderLayer.getTranslucent(), matrices, d, e, f);
        // Tripwire and particle rendering
      // Else, (if NOT fabulous graphics)
        } else {
        // FIRST start rendering translucents
          this.renderLayer(RenderLayer.getTranslucent(), matrices, d, e, f);
        // THEN draw lines, still using the translucent profiler
        // More string and particle rendering
      // End if


      As you can see, when not using fabulous graphics, the lines are drawn using the translucent profiler, which just happens not to outright break the rendering of particles, nametags, entities, and block entities in the vanilla game. However, it is possible that many of the problems "fixed" by the Fabulous graphics settings are indeed simply because of an error in the normal game code. Furthermore, when using custom shaders, this error unveils itself in a number of seemingly game-breaking ways. The attached examples use custom shaders (Sildur's Vibrant Lite)** with various combinations of translucent blocks and non-translucent objects. These issues are also painstakingly difficult to solve from outside of the game with shader mods such as OptiFine, since it is such a hardcoded vanilla bug. I am working on this issue for the Iris shader mod for Fabric, which is currently in beta development stages. OptiFine specifically happens to have found a way to patch this from the outside, but this is likely because of OptiFine's nature to override the vanilla rendering engine entirely. Iris is a Fabric mod, which means it uses Sponge Mixin to add to the top of the vanilla code, whereas Forge mods like OptiFine tend to tamper with or even completely override Mojang's original code. Because of this fact, it makes sense why a hardcoded bug like the one above is so hard to fix from outside the game using gentle methods like Fabric. I hope that, by taking the time to raise your awareness of this bug, I have encouraged you to spend a few minutes of your day rearranging these lines of code for the benefit of Minecraft Java, the community built around it, and the Fabric MC initiative. Thank you for your time.

      **NOTE: In the current build of Iris, all translucents are set to render as if they were water, (for development purposes) but I know this has no effect because, for example, the last screenshot is one that I took before this change showing the same issue. I also provided the translucent block in my hand most of the time to distinguish them.

      EDIT: I am currently working to confirm that this is still a bug in the latest snapshots, given the significant changes to shaders and rendering. I will also attempt to do so without the use of modded clients, since the addition of custom shader support may prevent the need.

        1. 2021-03-07_20.07.03.png
          1.72 MB
        2. 2021-03-07_20.07.16.png
          2.13 MB
        3. 2021-03-07_20.07.52.png
          1.93 MB
        4. 2021-03-07_20.08.19.png
          1.68 MB
        5. 2021-03-07_20.09.07.png
          2.05 MB
        6. 2021-03-07_20.18.14.png
          1.79 MB
        7. 2021-03-07_20.18.19.png
          2.19 MB
        8. 2021-03-07_20.18.50.png
          2.04 MB
        9. 2021-03-07_20.19.07.png
          1.77 MB
        10. 2021-03-07_20.19.14.png
          1.61 MB
        11. 2021-03-07_20.19.34.png
          2.04 MB
        12. 2021-03-07_20.20.11.png
          1.96 MB
        13. 2021-03-07_20.21.40.png
          1.79 MB
        14. 2021-03-07_20.21.46.png
          1.71 MB
        15. 2021-03-07_20.22.06.png
          1.72 MB
        16. 2021-03-07_20.22.07.png
          1.80 MB
        17. huge_2021-03-04_20.37.27_0000.png
          3.39 MB

            Unassigned Unassigned
            thedocruby Dr. Rubisco
            6 Vote for this issue
            8 Start watching this issue