Issue: Label Background Tint (2.3.3)

There is a slight tint on the background of any label. The tint is very subtle (low alpha) and it seems that it’s in the color of the label.

The issue appears both in the editor and in preview/release in web for me. Somebody also spotted this on mobile builds: https://www.reddit.com/r/gamedev/comments/gline1/were_having_a_problem_with_labels_in_cocos/

Repro steps:

  • add a label;
  • set the cache mode to NONE/BITMAP (with CHAR, the issue is still there, but less apparent);
  • notice the tint in the background.

If it’s not immediately apparent, try playing with the luminosity settings of the monitor.

Could really use the input of a dev here, @jare - please? :slight_smile:

Hi @Karg,
I’ve found a solution for your case.

Make a custom material with custom shader. Just change last lines of fragment shader like below:

ALPHA_TEST(o);
o.a = o.a-0.004;
gl_FragColor = o;

This will cutoff alpha channel a little bit and prevent that visual artifact. Normally I couldn’t see the problem in my monitor so I cranked colors to see the result and it works. Here is the video:

Let me know if you want to see a tutorial in this subject.
See you…

thanks, yeah, i suppose this could be a workaround, but i think it should be fixed at engine level. changing tens of labels is quite tediuous (only to change them back when a fix is issued) :slight_smile:

You may edit builtin shader code to not change labels manually until fix released.
It’s placed here in my setup:
C:\CocosCreator\2.3.3\resources\static\default-assets\resources\effects\builtin-2d-sprite.effect

1 Like