Godot: Artifacts when rendering HTML5 export on Samsung Galaxy Tab A (2019)

Created on 30 Oct 2019  路  4Comments  路  Source: godotengine/godot

Godot version:
7d710a745e3eecbde482349fff78f0a4e14f6371

OS/device including version:
Device with issue: Samsung Galaxy Tab A (2019)
Browser on device: Chrome 77.0.3865.116

Issue description:
Our game doesn't render correctly.

Example:
Screenshot_20191030-122954_Chrome

Correct rendering on Desktop Chrome:
Screenshot at 2019-10-30 12-33-46

Steps to reproduce:
More info will follow on what render features this game specifically uses.

Minimal reproduction project:
Will follow if needed.

bug html5 porting rendering

Most helpful comment

@clayjohn We should look at implementing a workaround for ETC transparency using two separate textures (RGB + alpha). It could be done by Godot automatically on import (preferably), or by letting the user specify an alpha channel texture. IIRC, this is what Unity does.

All 4 comments

@clayjohn This is the same version of the game that I sent you.

@uldall Thank you. After looking into it without the MRP I realized that this actually isnt a bug. It is a limitation of ETC texture compression. ETC textures don't support alpha channels. When you export to HTML5 with the "mobile" flag checked, it uses ETC textures and all alpha information is lost.

@clayjohn We should look at implementing a workaround for ETC transparency using two separate textures (RGB + alpha). It could be done by Godot automatically on import (preferably), or by letting the user specify an alpha channel texture. IIRC, this is what Unity does.

I have spoken to Juan about the best way to fix this issue. He does not like the idea of using two separate textures automatically on import. It would increase rendering cost to the user in a completely opaque way. Currently, users can specify an alpha texture manually if they want.

The alternative we settled on is to simply use the RGBA4444 format when etc compression is used on a texture with an alpha channel. This will store the texture as uncompressed, but with half the bits. Alternatively, users can specific not to compress the texture on import if they want full bit depth.

I will make a PR shortly that adds this functionality, hopefully in time to be included in 3.2 definitely, the fix will make it in for 3.2.1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bojidar-bg picture bojidar-bg  路  3Comments

n-pigeon picture n-pigeon  路  3Comments

SleepProgger picture SleepProgger  路  3Comments

mefihl picture mefihl  路  3Comments

gonzo191 picture gonzo191  路  3Comments