-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
MeshInstance shadows sometimes don't show in editor, resetting material temporarily fixes it [GLES2] #44255
Comments
I don't understand. You always have to restart the editor after switching renderers. |
@Calinou oh I forgot to say that in runtime the shadow works fine even you don't do that I mentioned, it's just a Editor issue |
Reposting assets from closed issue for reference. Issue description: Steps to reproduce: |
still happend in 3.4 beta5 |
This broke somewhere between 3.2.4 beta 1 (it worked) and 3.2.4 beta 2 (didn't work). Something on this list: Going to be a pain to bisect as the artifacts have expired... |
Still reproducible in 3.4 RC 1. I can confirm that the regression happened between 3.2.4 beta 1 and beta 2. I can try to do a bisect at some point, but if anyone else wants to burn some CPU cycles, feel free! |
Git bisect points at #43206. Seems a bit odd, but I tried commenting out all the |
Is this still reproducible in 3.5 beta 5 or later? I remember other issues caused by #43206 and some invalid RIDs that might have been solved by @lawnjelly and others. |
@akien-mga |
This is still reproducible in the current As #44255 (comment) describes it, assigning a Material to the MeshInstance directly or to the Mesh Surface seems to have an impact on whether the bug happens, though it might be more due to the order in which things are processed. For example in the "Shadow_Bug.zip" project, clearing the material on the "broken" mesh and then undoing it fixes the shadows. As a reminder, this was bisected to be a regression caused by #43206. There's surely still some invalid RID flakiness in there. |
Curiously, the issue still occurs even after turning off "view grid" in the view menu. 🤔 Maybe we can try manually commenting out the grid code to confirm that it is causing the issue. There don't seem to be any RID errors reported in the RID handles build.
Having the grid off disables
What is interesting is that while debugging this appears to be being called in a multithread fashion (because the debugger goes haywire), which is suggestive of a possible race condition. 🤔 Commenting out
fixes it. Putting some more debug output on creating and deleting the RIDs, printing out the RID id (e.g. 12512) and the revision (e.g. 1). It all seems okay, it is deleting both, and creating both on each update, and reusing the same slot (hence only the revision is changing). This is occurring even with the grid switched off (for the first few frames?) which suggests the grid defaults to on and it takes some time before it reads the editor / project setting for the "view grid" to turn it off, which explains why turning it off didn't fix the bug.
It is possible that the RIDs is a wild goose chase, and drawing the grid is setting an obscure OpenGL state that isn't being reset when drawing the cubes. This would help explain the GLES2 / GLES3 difference. Maybe we can test this. Another couple of ideas:
|
Godot version:
3.2.4 beta3
OS/device including version:
Issue description:
if your whole scene is imported form outside, the shadow won't be rendered if you switch from GLES3 to GLES2, you have to restart Godot Editor then this problem will be fixed. also if your imported scene use some built-in mesh like cubemesh or spheremesh, then you won't have this problem, shadow will be rendered normally when you switch from GLES3 to GLES2
Steps to reproduce:
find some outside model
import this model to the Godot
open the scene of this model and save it as .tscn
switch from GLES3 to GLES2
Minimal reproduction project:
bug.report.zip
The text was updated successfully, but these errors were encountered: