-
Notifications
You must be signed in to change notification settings - Fork 34
GLES2 MSAA settings not working #54
Comments
Relevant PR: godotengine/godot#28518 |
I used some printf debugging and the check added in the PR godotengine/godot#28518 you referenced seems to work on the oculus quest and it is correctly reported that MSAA is supported. |
As far as I'm aware the MSAA implementation in Godot was a GLES3 only feature. I vaguely recall a discussion on IRC about creating an alternative for the GLES2 driver. That said, @NeoSpark314 could be correct in his remark. |
@NeoSpark314 Can you open an issue on the Godot engine project. It'd be ideal if we can resolve this issue before 3.2 is final. |
Yes I'll create one; I just tested it again and the problem is still present. From what I have seen I would assume that the same issue exists also with desktop VR headsets on the GLES2 renderer but I have no hardware to verify this. |
Issue godotengine/godot#33188 is created. |
I managed to get an old Oculus DK2 and tested the proposed fix on Windows. As @clayjohn already suspected in a comment it does not work on desktop that way. My current understanding of this is, that for desktop it would require the external texture to be created with MSAA via Independent of this would it be an option to have the android only fix first? It would resolve the issue for Oculus Quest and would not introduce a regression compared to the current state. |
@NeoSpark314 I compiled godot master with your pull request #33291 applied, but MSAA is still not working for me. I tried importing your Godot Oculus Quest Toolkit project and set MSAA to 4x in the quality settings. When I run it in the editor MSAA is working, but not on my Quest. |
@andy-d1969 thanks a lot for also looking into this. I will try it again in a moment. |
Maybe sth. went wrong while applying the PR or the build? If you want you could try the version I just built: https://www.dropbox.com/s/a1wgke4adufzdjd/android_debug.apk?dl=0 |
I cannot install your apk:
What could went wrong in the build? The binary is working. |
Ah; sorry; I did not mention it; the .apk is just the godot android export template you would need to use instead of the one you build from godot. |
Oh; ups; please ignore; that was the issue number; PR is indeed godotengine/godot#33291 |
With your apk MSAA is working. Edit: Ok, sorry, my fault. I did only rebuild the linux binary of the editor with your patch applied, not the android templates. |
When rendering to an external texture and MSAA was active (as happened in the Oculus Mobile ARVR plugin) no MSAA was rendered as the correct depth buffer and multisample texture target was not used. This also fixes GodotVR/godot_oculus_mobile#54
The MSAA settings (Under Project Settings->Rendering->Quality->Msaa seem to have no effect on the actual rendering inside the Oculus Quest in GLES2.
Here is a comparison shot with MSAA off (left) vs MSAA 4x (right):
I tried to investigate briefly; My first suspicion is that in
void RasterizerStorageGLES2::render_target_set_external_texture(RID p_render_target, unsigned int p_texture_id)
: https://github.com/godotengine/godot/blob/1d9233c3882afe888b9396f7f2aac917d4dcac4d/drivers/gles2/rasterizer_storage_gles2.cpp#L5063no check if msaa is enabled (and no call to
glRenderbufferStorageMultisample
orglFramebufferTexture2DMultisample
is performed) when the external eye target texture is attached to the framebuffer for rendering.The text was updated successfully, but these errors were encountered: