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

macOS: Incorrect sign surface normal causes the text colour to not be applied properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.8, 19w39a
    • Minecraft 1.4.2, Minecraft 14w26c, Minecraft 14w27b, Minecraft 14w28b, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w21a, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w33a, Minecraft 1.11.2, Minecraft 1.12.2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03c, Minecraft 19w04a, Minecraft 1.14 Pre-Release 1, Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2 Pre-Release 4, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3 Pre-Release 3, 1.14.4, 19w39a
    • Confirmed
    • Rendering

      Bug Description

      While viewing a sign with coloured text, you are unable to see the text colour from the front of the sign on macOS / OS X. This effects every Minecraft version to date (with coloured sign text of course), regardless of macOS version, Java version, or graphics driver version. This bug seems to only effect older mac processors. This bug does not effect Minecraft running on Windows or any version of Linux (that I know of).

      Bug Example

      Simply spawn in a sign with coloured text on macOS / OS X and observe the colour of the text while viewing the front of the sign straight-on and from a sharp angle.

      Bug Cause

      This bug is caused by incorrectly defining the surface normal vector of the front of the sign while rendering the text on a sign. This causes the surface "face" to be defined as the back of the sign, rather than the front (where the text is visible). The OpenGL implementation on Windows and Linux appears to have a relaxed policy for applying colour to the surface, while the OpenGL implemenation on macOS has a stricter policy for applying the colour. It appears that OpenGL on macOS does not apply the colour if the surface is not "visible", which is why the colour is only applied on sharp angles to the sign, where part of the surface would be visible.

      Bug Fix

      This bug can easily be fixed by properly defining the surface normal while rendering the text on the sign. This change does not break rendering behaviour on Windows and Linux (tested on Windows 10 and Arch Linux), while fixing the text rendering on macOS (tested on OS X Mountain Lion, OS X Mavericks, OS X Yosemite, OS X El Capitan, macOS Sierra, macOS High Sierra, and a beta of macOS Mojave).

      How to Fix - MCP Mappings

      Minecraft 1.12.2

      • Navigate to: net.minecraft.client.renderer.tileentity.TileEntitySignRenderer
      • Find line 76: GlStateManager.glNormal3f(0.0F, 0.0F, -0.010416667F);
      • Change line 76 to: GlStateManager.glNormal3f(0.0F, 0.0F, 0.010416667F);

      How to Fix - Obfuscated Game

      Minecraft 1.13.1 (Same obfuscation as Minecraft 1.13.1-pre2)

      • Navigate to: cwg
      • Find line 43: ctz.a(0.0F, 0.0F, -0.010416667F);
      • Change line 43 to: ctz.a(0.0F, 0.0F, -0.010416667F);

      Minecraft 1.13.1-pre2 (Same obfuscation as Minecraft 1.13.1-pre1)

      • Navigate to: cwg
      • Find line 43: ctz.a(0.0F, 0.0F, -0.010416667F);
      • Change line 43 to: ctz.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13.1-pre1

      • Navigate to: cwg
      • Find line 67: ctz.a((float)0.0f, (float)0.0f, (float)-0.010416667f);
      • Change line 67 to: ctz.a((float)0.0f, (float)0.0f, (float)0.010416667f);

      Minecraft 18w33a

      • Navigate to: cwf
      • Find line 67: cty.a((float)0.0f, (float)0.0f, (float)-0.010416667f);
      • Change line 67 to: cty.a((float)0.0f, (float)0.0f, (float)0.010416667f);

      Minecraft 18w32a (Same obfuscation as Minecraft 18w31a)

      • Navigate to: cwe
      • Find line 67: ctx.a(0.0F, 0.0F, -0.010416667F);
      • Change line 67 to: ctx.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 18w31a

      • Navigate to: cwe
      • Find line 64: ctx.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctx.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 18w30b

      • Navigate to: cvz
      • Find line 64: cts.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: cts.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 18w30a

      • Navigate to: cvy
      • Find line 64: ctr.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctr.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13

      • Navigate to: cvw
      • Find line 64: ctp.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctp.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13-pre10

      • Navigate to: cvu
      • Find line 64: ctn.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctn.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13-pre10

      • Navigate to: cvu
      • Find line 64: ctn.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctn.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13-pre9 (Same obfuscation as Minecraft 1.13-pre8)

      • Navigate to: cvs
      • Find line 64: ctl.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctl.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13-pre8

      • Navigate to: cvs
      • Find line 64: ctl.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctl.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13-pre7

      • Navigate to: cvi
      • Find line 64: ctb.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: ctb.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.13-pre6

      • Navigate to: cva
      • Find line 64: cst.a(0.0F, 0.0F, -0.010416667F);
      • Change line 64 to: cst.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.12.2 (Same obfuscation as Minecraft 1.12.1)

      • Navigate to: bxf
      • Find line 75: bus.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bus.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.12.1

      • Navigate to: bxf
      • Find line 75: bus.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bus.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.12

      • Navigate to: bxd
      • Find line 75: buq.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: buq.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.11.2 (Same obfuscation as Minecraft 1.11.1)

      • Navigate to: bss
      • Find line 75: bqg.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bqg.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.11.1

      • Navigate to: bss
      • Find line 75: bqg.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bqg.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.11

      • Navigate to: bsq
      • Find line 75: bqe.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bqe.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.10.2 (Same obfuscation as Minecraft 1.10.1)

      • Navigate to: bqm
      • Find line 75: bob.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bob.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.10.1 (Same obfuscation as Minecraft 1.10)

      • Navigate to: bqm
      • Find line 75: bob.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bob.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.10

      • Navigate to: bqm
      • Find line 75: bob.a(0.0F, 0.0F, -0.010416667F);
      • Change line 75 to: bob.a(0.0F, 0.0F, 0.010416667F);

      Minecraft 1.9.4 (Same obfuscation as Minecraft 1.9.3)

      • Navigate to: bpq
      • Find line 75: bnf.a(0.0F, 0.0F, -1.0F * ☃);
      • Change line 75 to: bnf.a(0.0F, 0.0F, ☃);

      Minecraft 1.9.3 (Same obfuscation as Minecraft 1.9.2)

      • Navigate to: bpq
      • Find line 75: bnf.a(0.0F, 0.0F, -1.0F * ☃);
      • Change line 75 to: bnf.a(0.0F, 0.0F, ☃);

      Minecraft 1.9.2 (Same obfuscation as Minecraft 1.9.1)

      • Navigate to: bpq
      • Find line 75: bnf.a(0.0F, 0.0F, -1.0F * ☃);
      • Change line 75 to: bnf.a(0.0F, 0.0F, ☃);

      Minecraft 1.9.1

      • Navigate to: bpq
      • Find line 75: bnf.a(0.0F, 0.0F, -1.0F * ☃);
      • Change line 75 to: bnf.a(0.0F, 0.0F, ☃);

      Minecraft 1.9

      • Navigate to: bpt
      • Find line 75: bni.a(0.0F, 0.0F, -1.0F * ☃);
      • Change line 75 to: bni.a(0.0F, 0.0F, ☃);

      Minecraft 1.8.9

      • Navigate to: bhj
      • Find line 77: GL11.glNormal3f(0.0F, 0.0F, -1.0F * ☃);
      • Change line 77 to: GL11.glNormal3f(0.0F, 0.0F, ☃);

      Minecraft 1.8

      • Navigate to: cnv
      • Find line 77: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 77 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.7.10

      • Navigate to: bmr
      • Find line 54: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 54 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.6.4

      • Navigate to: bja
      • Find line 53: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 53 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.5.2

      • Navigate to: bja
      • Find line 50: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 50 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.4.7

      • Navigate to: bdt
      • Find line 50: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 50 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.3.2

      • Navigate to: axq
      • Find line 50: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 50 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.2.5

      • Navigate to: ll
      • Find line 51: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 51 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.1

      • Navigate to: ku
      • Find line 51: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 51 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Minecraft 1.0

      • Navigate to: aeu
      • Find line 51: GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
      • Change line 51 to: GL11.glNormal3f(0.0F, 0.0F, f3);

      Notice the sign of the z-coordinate of the normal vector. This change will correctly define the surface normal to be the front of the sign, fixing coloured signs on macOS.

        1. 2012-10-30_09.18.12.png
          29 kB
          Nathan Wilson
        2. 2012-10-30_09.18.18.png
          97 kB
          Nathan Wilson
        3. 2016-02-24_14.36.21.png
          84 kB
          Jordin Smith
        4. 2016-02-24_14.36.43.png
          45 kB
          Jordin Smith
        5. 2016-03-31_16.06.49.png
          50 kB
          Jordin Smith
        6. 2016-03-31_16.06.56.png
          93 kB
          Jordin Smith
        7. 2016-12-29_15.37.35.png
          356 kB
          kaleb418
        8. 2018-06-18_18.11.05.png
          202 kB
          Jordin Smith
        9. 2018-06-18_18.11.08.png
          177 kB
          Jordin Smith
        10. 2018-06-18_18.19.29.png
          327 kB
          Jordin Smith
        11. 2018-06-18_18.19.33.png
          340 kB
          Jordin Smith

            Unassigned Unassigned
            Jordin Jordin Smith
            Votes:
            11 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: