Android: In what ways would the engine fail when using GLES3 on incompatible devices?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By indy2005

If I create a GLES 3 project, how will this fail on Android? Will it be somehow listed as incompatible or fail miserably on the device? I want to use glow and bloom.

Note: Edited title to be more specific.

Akien | 2020-09-28 07:44

:bust_in_silhouette: Reply From: Akien

If you create a GLES3 project, the AndroidManifest.xml file will require OpenGL ES 3.0 support. That means that any Android device which does not have OpenGL ES 3.0 drivers will not be able to install the game at all - it will be shown as incompatible on Google Play.

The main issue you’re alluding to is that a significant proportion of Android devices have OpenGL ES 3.0 drivers, but their drivers are very bad and can crash when some OpenGL ES 3.0 features are used. They’re typically lower-end phones with chipsets like Adreno 300-something.

For those it’s tricky, as the device reports OpenGL ES 3.0 support, but in practice their “support” is so bad that it’s not usable, and it would be better to use OpenGL ES 2.0 on such devices to be safe. There’s no easy way to detect that, so if it’s important for you that the game runs on as many devices as possible, you should use GLES2.

Note that GLES2 has Glow support since Godot 3.2, so you should be able to use that: https://docs.godotengine.org/en/stable/tutorials/misc/gles2_gles3_differences.html#environment-features

Thanks. Mine is a 2D game. I think
I read somewhere that hdr threshold needs to be less than 1 for gles2, this would mean I have little control over what glows. I am currently pushing raw colour values over 1 for the things I need to glow. Or have I misunderstood? Is it just the modulate value impacting glow or the underlying sprite colours? I could push all nodes modulate to 0.98 and the things I want to glow I could modulate to 0.99.

indy2005 | 2020-09-28 10:21

See Environment — Godot Engine (stable) documentation in English and Environment — Godot Engine (stable) documentation in English

GLES2 doesn’t support HDR so you need to reduce the threshold and rely on 0.9+ values for glow/bloom.

Akien | 2020-09-28 12:56

The modulate needs to be 0.9? I am not sure how to make one sprite glow and nothing else, unless it is just a modulate threshold

indy2005 | 2020-09-28 14:31

Also worth noting that since the issue is driver related, there’s no one way that failures will occur. It could fail in any number of always depending on which actual driver bug is hit, so attempting to detect it is mostly an exercise in futility anyway. If you do require OpenGL ES 3 on Android, I would suggests having a good bug reporting and ideally tracing system in place and then keeping track of a list of unsupported devices. From there you’ll just need to block those devices manually as they come up.

jonbonazza | 2020-09-29 03:01