-
-
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
nvidia rect flicker workaround (GLES3) causing shader bugs #41606
Comments
cc @lawnjelly |
I'll take a look. 👍 It's probably something like the shader isn't bound. |
Thank you! |
This reverts commit a7f67f2. For some reason, enabling this workaround in GLES3 causes the player death effect shader not to work anymore. In the meantime, revert the change and wait for godotengine/godot#41606 to provide some kind of resolution.
Any updates on this? I assume it's too late to try and get a fix in time for 3.2.3 but maybe for 3.2.4? |
I did have a look and the solution wasn't as obvious as I'd hoped. It seems to be to do with the shader versioning in GLES3 causing the correct shader not to be bound if I remember right (this is done quite differently to GLES2). I need to spend some time going through it to understand the shader versioning at the same time as GLES3 batching as it may affect batching in a similar way, so it will be 3.2.4 I'm afraid. |
Ok, thanks for looking! |
Incidentally, anyone watching this topic should also be watching #42119, and the builds at: The reason being, is that the batching path by default also fixes the nvidia flicker (unless you use single_rect_fallback). So if the custom shaders works ok there then this is a better solution than nvidia_workaround for the legacy path (although I will try and fix this too). |
Can you still reproduce the issue with 3.2.4 beta 3 or later? It should include batching for GLES3 by default. which might help here. |
I'm unfortunately not at home right now and thus won't have access to my desktop (the original device for this issue) for another month or two. It also seems as though my old laptop (Lenovo T430) is no longer supported for the GLES3 backend for 3.2.4-beta4, so I can't even test on that either. |
Actually, it seems as though I can switch to GLES3 from within the editor, even though the project selection dialog claims that my GPU drivers are incompatible (and thus greys out the GLES3 option entirely). I'm not sure if that is intended behavior but after switching to GLES3 from within the editor I can confirm that the the shader above works with default project settings in 3.2.4-beta4 (i.e. with batching enabled). |
This is a regression in 3.2.4beta4 which will be fixed by #44302. |
@fmenozzi Can you (or anyone else) still reproduce this bug in Godot 3.3.4 or any later release? |
Seems to be working in 3.3.4 (i.e. I can't reproduce the issue; shader behaves as expected with flicker workaround both enabled and disabled). |
Godot version:
3.2.2.stable
OS/device including version:
OS: Ubuntu 18.04.1
Graphics card: NVidia GeForce GTX 1070/PCIe/SSE2
Backend: GLES3
Issue description:
I have a simple canvas item shader as part of an effect sequence that draws a black circle on the screen and animates the radius to expand outward, the minimum-viable version of which is reproduced below:
Prior to enabling the nvidia rect flicker workaround (GLES3) in the project settings, this shader behaved as expected: changing the
radius_uv
uniform would cause the circle to expand and contract appropriately. The shader worked both in-game and in the editor.However, after enabling the flicker workaround and reloading the project, the shader no longer behaves correctly. Rather than animating the circle as expected, changing the
radius_uv
uniform now causes the screen to be blank until the uniform value exceeds 0.7, after which the entire screen turns black. The significance of 0.7 is unknown to me. This issue occurs both in-game and in the editor.Steps to reproduce:
Load the reproduction project (which does not have the rect flicker workaround enabled) and mess around with the
radius_uv
uniform shader param in$World/CanvasLayer/ColorRect
, observing that the black circle grows and shrinks.Now go to project settings, enable the nvidia rect flicker workaround, reload the project, and mess around with that same uniform, observing now the issue described above.
Minimal reproduction project:
reproduce-nvidia-rect-workaround-shader-bug.zip
EDIT: I accidentally uploaded a project that enables the flicker workaround, instead of disabling it like I mentioned above. This means the shader will not work by default, rather than work by default.
The text was updated successfully, but these errors were encountered: