Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader looks different on Android (two devices; GLES2) #27784

Open
LinuxUserGD opened this issue Apr 7, 2019 · 7 comments
Open

Shader looks different on Android (two devices; GLES2) #27784

LinuxUserGD opened this issue Apr 7, 2019 · 7 comments

Comments

@LinuxUserGD
Copy link
Contributor

LinuxUserGD commented Apr 7, 2019

Godot version:
master

OS/device including version:
Android (zerofltexx Ressurrection OS 9.0; matissewifi Lineage OS 7.1)

Issue description:
While the shader looks correct on my smartphone, on my tablet with lineage os there are strange rectangles.

Steps to reproduce:
bug
expected

Minimal reproduction project:
Solus-Stunts-v1.0-bug.zip

@LinuxUserGD LinuxUserGD changed the title shader looks different on A Shadow looks different on Android (two devices) Apr 7, 2019
@LinuxUserGD LinuxUserGD changed the title Shadow looks different on Android (two devices) Shader looks different on Android (two devices) Apr 7, 2019
@akien-mga
Copy link
Member

Could you retrieve OpenGL ES capabilities of both devices with this app? https://play.google.com/store/apps/details?id=de.saschawillems.glescapsviewer
It lets you upload the report from within the app which can then link from opengles.gpuinfo.org (the upload function might give an error, but it seems to work nevertheless).

@akien-mga akien-mga added this to the 3.2 milestone Apr 8, 2019
@LinuxUserGD LinuxUserGD changed the title Shader looks different on Android (two devices) Shader looks different on Android (two devices; GLES2) Apr 8, 2019
@LinuxUserGD
Copy link
Contributor Author

LinuxUserGD commented Apr 8, 2019

@clayjohn
Copy link
Member

Is this still reproducible in 3.1.2 or 3.2beta?

@clayjohn clayjohn removed this from the 3.2 milestone Jan 10, 2020
@LinuxUserGD
Copy link
Contributor Author

I can still reproduce it using Godot 3.2.1 stable.

@LinuxUserGD
Copy link
Contributor Author

LinuxUserGD commented Apr 18, 2020

I tried it on linux with android one click deploy and changed texture import from vram to lossy but this didn't fix it:
First try:
Linux:
linux1
Android:
android1

Second try (without albedo color param):
Linux:
linux2
Android:
android2

And those are the textures assigned to the shader param:
shader param

So expected would be that the terrain texture (called "splatmap" in this case) is displayed when far away and the detailed grass albedo texture together with roughness and normal blends over the terrain where the car drives.

Maybe mipmaps don't work in GLES2 on this device or just multiplying the texture uv and repeating doesn't work.

Edit: I still need to add a minimal reproduction project later to only display the shader as for now it's part of the game. But should be possible to assign the shader/material to any mesh for trying to reproduce this issue.

@akien-mga
Copy link
Member

Is this still reproducible in 3.3 or later?

A minimal reproducible project would be useful, though even then it might be tricky to debug as this issue likely only happens with devices which lack support for some features or have driver bugs (bugs which might be even more prominent on unofficial ROMs like LineageOS).

@Calinou
Copy link
Member

Calinou commented Apr 27, 2021

Those artifacts may be due to the more limited shader precision available on mobile devices. See godotengine/godot-proposals#1747. In the meantime, you can detect whether the host OS is a mobile platform using OS.has_feature("mobile") and use a simpler shader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants