zeroman icon indicating copy to clipboard operation
zeroman copied to clipboard

Artefacts on certain objects

Open deltabeard opened this issue 2 years ago • 15 comments

Hello. Great work on the project.

I was playing this on my Android phone in Firefox and noticed that there were some artefacts on some of the background objects once reaching the second ladder. See the screenshot below.

Screenshot_20221105-000712_Firefox

Thanks.

deltabeard avatar Nov 05 '22 00:11 deltabeard

Thanks!

These look like floating point precision issues. Some tiles look like their coordinates are off by one. This will be very hard for me to reproduce. Sadly, I don't own an Android device. I tried setting all shaders to precision lowp float; without success.

Can you tell me what device this is? Also, have you tried the game using Chrome on your device?

fabioarnold avatar Nov 05 '22 10:11 fabioarnold

I added a bias to the tilemap shader in #6 and deployed this change to https://zeroman.space. Can you please try again? And don't forget to clear your cache.

fabioarnold avatar Nov 05 '22 11:11 fabioarnold

This was on Firefox 106.1.0; Android 12; Samsung SM-G781B.

I have also tested this on Bromite (a Chromium fork) and I get the same problems. Bug appears in Bromite

During my tests I suddenly got this error in Firefox and Edge on Windows 10, so I'm unable to continue testing for the time being. image

Edit: Ah. I must have been testing whilst you were making changes. I'll test again.

deltabeard avatar Nov 05 '22 11:11 deltabeard

This new change has significantly improved the issue but there are still some tiny artefacts left on both Firefox and Bromite on Android: Firefox Bromite

deltabeard avatar Nov 05 '22 11:11 deltabeard

Ok, I increased the bias. Can you please try again?

fabioarnold avatar Nov 05 '22 12:11 fabioarnold

The latest change hasn't made any difference.

deltabeard avatar Nov 05 '22 14:11 deltabeard

One last try: I resized the tileset to a power of two.

fabioarnold avatar Nov 05 '22 15:11 fabioarnold

I can't test this because I can't get passed the start screen using the onscreen controls. Screenshot_20221106-122714_Bromite

deltabeard avatar Nov 06 '22 12:11 deltabeard

Ah, sorry. I just deployed a version that handles touch on the title screen.

fabioarnold avatar Nov 06 '22 12:11 fabioarnold

The latest changes haven't a made a difference either.

Screenshot_20221106-124257_Bromite

It seems that the number of artefacts are very few.

deltabeard avatar Nov 06 '22 12:11 deltabeard

Thanks for testing. I probably need access to real hardware to fully resolve this issue. :(

fabioarnold avatar Nov 06 '22 12:11 fabioarnold

fwiw, works fine in Firefox on my Pixel 4A. Perhaps it's an issue with lower screen resolutions?

silversquirl avatar Nov 07 '22 11:11 silversquirl

fwiw, works fine in Firefox on my Pixel 4A. Perhaps it's an issue with lower screen resolutions?

Thanks for testing. I think we can say that it isn't a browser or platform issue then.

The Pixel 4A is 1080x2340 whereas my phone is 1440x3200. So maybe it's a problem with higher resolutions?

deltabeard avatar Nov 07 '22 12:11 deltabeard

Oops! My bad, should've checked the resolutions first

Could also be a hardware-specific thing, though they seem to have similar-ish GPUs (Adreno 618 on mine vs Adreno 650 on yours)

silversquirl avatar Nov 07 '22 12:11 silversquirl

Could also be a hardware-specific thing, though they seem to have similar-ish GPUs (Adreno 618 on mine vs Adreno 650 on yours)

What is the output of https://webglreport.com/?v=2 on your phone? I wonder if there is a difference to my results: WebGL report for S20 5G FE

From the zeroman source code, it seems that WebGL 2 is used if it's available, so I wonder if there's something different with the specs of WebGL 2 on our phones?

deltabeard avatar Nov 07 '22 13:11 deltabeard