Strange dot artifacts in 2D graphics

,

Could someone please let me know if they also encounter such weird graphics glitches in their own WebGL builds please? We aren’t seeing this in Android. Only on WebGL and Windows Standalone and it is reproduced on different PCs.

Unity 2018.4.27f1
.NET 4.x
Linker target: Both
Color space Gamma
Auto Graphics API
Graphics settings: Defaults
Texture settings: Default

Here is the original texture and then the WebGL output (2D UI image):

7086691--843676--webgl_compression-artifacts_2.png

It’s not just UI though; Here is a texture that’s implemented as a tilemap sprite:

Help! It looks terrible!

This does look curious. I do recall this kind of artifact to occur in the past when the Camera clear settings had been disabled, so that the Camera did not clear the depth buffer at all, causing an issue on tiled renderer GPUs in WebGL. That might be something to double check.

If that is not it, then try double checking texture compression formats. If the textures are compressed, does changing the texture format to uncompressed help?

If not, it would be great to have a test case available somewhere.

First, let me add that this DOES appears in Windows standalone builds too, not just WebGL. @jukka_j So where should this forum thread be moved to??

I don’t believe camera clearing is a culprit as the problem affects specific textures only and the artifacts are clearly “part of” the texture. (eg: they move with the texture, they scale, etc. They clearly ARE the texture.)

We use sprite atlases for pretty much everything, and all atlases have similar settings.

Exhibiting problem is set to:
Source textures:
Resize: Mitchell
Format: Automatic
Compression: None

Master Texture Atlas: (not in build)
sRGB: yes
Format: Automatic
Compression: None

Variant Atlas:
sRGB: yes
Format: Automatic
Compression: Normal Quality
Use Crunch: Yes / RGBA DXT5
Quality: 100

Example NOT exhibiting problem is set to:
Source textures:
Resize: Mitchell
Format: Automatic
Compression: None

Master Texture Atlas: (not in build)
sRGB: yes
Format: Automatic
Compression: None

Variant Atlas:
sRGB: yes
Format: Automatic
Compression: Normal Quality
Use Crunch: Yes / RGBA DXT5
Quality: 100

So yes, identical settings, yet one has textures with weirdness and one does not. Which leads me to believe it has to do with the crunch compressor and specific colors being near each other? :frowning:

I’ll investigate further to see what minor differences might exist between those textures which consistently have the artifacts and which don’t. I’ll also update to 2018.4.33 just in case.

Mods: Feel free to move this into the 2D forum.

I did a test, turning off Crunch compression on a couple Atlases, and the graphical artifacts go away, while they stay on those atlases that I left Crunch on. So it would appear to be a bug/problem with Crunch.

(Still have not tested 2018.4.33 though – This test was with 2018.4.27f1)

Very interesting findings… moved to 2D forum, maybe the 2D devs might be able to provide insight.

1 Like