-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
GLES3 not working on android emulator + workaround #74828
Comments
It sounds like your emulator doesn't fully support OpenGL ES 3.0. Being able to render to a |
I absolutely agree, but I was wondering if I'm missing something else and the format is not really the issue... I looked for a way to check if a format is supported but like you said, it is assumed to work on all gles3 devices. Some questions that come to mind: For reference, I'm using the standard emulator in Android studio. |
I can't think of anything else that would be responsible that would also go away when switching to an RGBA8 buffer.
It's used to reduce banding in 3D. 8bits is really low precision for 3D rendering. Using 10 bits helps a lot |
I played with it a bit more and found out another way to "solve" the issue without disabling RGB10_A2: in rasterizer_gles3.cpp :: _blit_render_target_to_screen
this basically creates a temporary fbo with only the color attachment right before blitting to the screen (similar to what happens in XR with view_count > 1) I have no idea why this works and the regular fbo does not, the only difference between them is that rt->fbo has a depth buffer attached as well. Any ideas? |
Use a temporary framebuffer for screen copy from rendertarget to screen. This solves GLES3 rendering in android studio emulator (before this change there is just a black screen) Based on discussion in: godotengine#74828
Use a temporary framebuffer for screen copy from rendertarget to screen. This solves GLES3 rendering in android studio emulator (before this change there is just a black screen) Based on discussion in: godotengine#74828 (cherry picked from commit 5956aa1)
Fixed by #74945. |
Godot version
9b9bb41
System information
Android12 emulator, GLES3
Issue description
Using Godot 4 on an Android emulator with the GLES3 renderer results in a black screen and no crash / erros.
I managed to resolve the issue with the following change:
Which effectively disables the RGB10_A2 internal format for render targets and uses RGBA8 instead.
These 2 format changes fix rendering on my android emulator.
Im not sure what RGB10_A2 is used for (HDR?), but my workaround does not seem like the best solution.
Perhaps someone who knows a little bit more about the code here could suggest a different solution.
Steps to reproduce
Run any godot project on android emulator using GLES3 renderer.
Might be relevant:
my host machine is an M1 macbook pro
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: