mojira.dev
MC-123703

White colored blocks cannot be fully white

The bug

It is impossible for a block in the game to be fully white, the brightest color is 0xFCFCFC.

Disabling ambient occlusion or shading on the block model doesn't fix this.

How to reproduce

  1. Load

[media]
  1. texture pack into the game.

  2. Take a screenshot, and get the color of the the glowstone block.
    → ❌ You'll notice that the color code is 0xFCFCFC rather than 0xFFFFFF.

Code analysis / Fix

This is caused by lines 911-913 and 984-986 of the EntityRenderer (MCP name) class:

f8 = f8 * 0.96F + 0.03F;
f9 = f9 * 0.96F + 0.03F;
f10 = f10 * 0.96F + 0.03F;

Which sets red, green, and blue to 0.99 (0xFCFCFC) even if they were 1.

Related issues

Attachments

Comments

migrated
[media][media]
migrated

Arguably, it is very hard to get an L of 100 in real life.

For that matter, it's very hard to get L's below 50 as I understand it also.

Maybe this is the point where Minecraft could add a "black level" – just as bright white is made a little less than bright white, so to a dark black object could be raised up to the monitor's Black level so that dark objects that are supposed to be dark but visible do not disappear completely.

migrated

Maybe this is the point where Minecraft could add a "black level" – just as bright white is made a little less than bright white, so to a dark black object could be raised up to the monitor's Black level so that dark objects that are supposed to be dark but visible do not disappear completely.

It's not the applications role to make assumptions about the capabilities of the display hardware. If Minecraft takes an interest in color management it should respect the color profile installed by the OS by not resetting it or changing it. Many games do this, and there's even dedicated software to detect when games do this and set it back. There's an excellent write up about this here: https://forums.guru3d.com/threads/games-color-profiles.387074/

At the very most Minecraft should detect when alternate color spaces are reported by the OS such as Rec. 2020 when rendering to a display device compliant with HDR10. It can then adjust the texture colors so that they are displayed properly assuming the textures target something like sRGB.

migrated

No I think the java and open gl should determine what colors can and cannot be displayed mc shouldn't be limiting any colors

migrated

Confirmed for 1.13.1. Attached a resource pack that will turn glowstone white for easy reproduce.

migrated

Confirmed for 19w41a. Wouldn't mind to get ownership of this report

migrated

Can confirm in 21w15a.

Brevort

Can the summary of this please be changed? "White is not white" is very vague.

ampolive

Can confirm in 1.17.1.

muzikbike

Relates to MC-50734 and MC-93919.

migrated

(Unassigned)

Confirmed

Gameplay

Low

Rendering

rendering, resource-pack-support

Minecraft 1.12.2, Minecraft 1.13, Minecraft 18w30a, Minecraft 1.13.1, Minecraft 1.13.2, ..., 1.17.1, 21w39a, 1.18.1 Release Candidate 2, 1.20.2, 1.21.5

Retrieved