-
Notifications
You must be signed in to change notification settings - Fork 96
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
Android Texture Artifacts #137
Comments
Be careful to only use My guess is that you need to use |
@Calinou according to the docs highp is the default (on desktop presumably) so adding it shouldn't affect performance at all, right? According to the image above, it looks like maybe lowp is the default on android/mobile renderer? So changing the UV to highp or even mediump will only affect android performance. @m4gr3d, did you use the mobile renderer? Do you want to help troubleshoot this? If you enable custom shader in the storage resource, it will give you an editable one and you could experiment with adding mediump and highp around the shader. |
Yes, this is exactly what's happening 🙂 I think desktop GPUs tend to ignore precision hints anyway. The hints are mostly needed for mobile GPUs. (This is not about the rendering method, but about the graphics driver.) |
Yes, I used the mobile vulkan renderer. I can try modifying the custom shader to see if that improves things. |
@TokisanGames I played around with adding |
Ok. Another possibility is that DDS textures aren't supposed to work on android anyway. Since Godot doesn't import them, it isn't converting them. Perhaps the android sdk or OS is converting them poorly? What if PNG textures are used, imported with ETC2 enabled in the project settings and with vram compressed? That way Godot will convert to proper etc2 files. However this line might need to be changed to allow |
It was reported that the cause of this issue has been found: https://discord.com/channels/691957978680786944/1065519581013229578/1192757400315363398 |
I'm unable to access the discord link; can you paste the cause of the issue here? |
The Android OS/SDK does nothing special to DDS textures. These need to be decoded on the CPU by Godot (or transcoded to a compatible VRAM-compressed format) if S3TC support isn't available on the hardware. We could choose to perform this automatically on unsupported formats, but it comes with a significant impact on memory usage (if decoding to lossless) or quality and binary size (if transcoding to ETC2). Both choices will impact loading times negatively too, but transcoding will be particularly bad on this aspect. (Note: This assumes we are talking about an exported project or runtime DDS loading here, with no existing ETC2 textures available.) |
I think this artifact is due to or related to using DDS files since android doesn't have wide support for them. I think that using PNGs which get converted to etc2 would be fine, but I haven't confirmed that. I have replaced the demo textures with PNG so it can be a mobile demo as well. @lfxu reported this, which I have not tested or implemented myself yet:
|
Fixed in #296. We can use more android testers to confirm. I heard everything with android should be working now. The github builds include android arm 32 & 64. |
m4gr3d ran terrain3d on android (samsung galaxy tab) and it works fine, except the shader looks like it has terrible floating point precision.
https://chat.godotengine.org/channel/android?msg=Xo95Qcs52bv3BAF2X
Screen_Recording_20231116_153742_Terrain3D.mp4
terrain_3d_demo_godot_android_editor.mp4
@Calinou suggested
The text was updated successfully, but these errors were encountered: