-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Tilemap/draw_rect random flickering with Nvidia drivers #9913
Comments
Can confirm this is still happening using Godot 3.0 custom build 29db531 It also happens in the editor: It should be all grass. EDIT: It looks like if the Quadrant Size is set to 1 the problem disappears EDIT 2: The tiles don't disappear but get moved (a transform problem?) EDIT 3: A low quality video. https://streamable.com/6a07b Took me a while to trigger the problem (the editor is set to update always) |
This issue is still happening in latest master 1f46853 It seems the problem isn't a tilemap only related one. I found the same issues with a big text inside a label. I have the feeling it only happens after using the |
Update: This issue is a core issue. It's also happening to the Editor itself. I couldn't take a screenshot because by the time I notice it and want to take a screenshot the editor has probably updated and the problem goes away. I noticed the problem in two sections of the editor, it's not that it happens in these two sections but the sections I've noticed the problem: In the Output content some letters flickered and one of the tab labels at the bottom of the screen where the Output, Debugger, Audio,... labels are. The D from the Debugger label started to flicker. It's not easy to trigger but it's the same problem. |
I've got the label problem on video (flickering starts about half the video) https://streamable.com/e31xp look closely towards the end of the 4th line and you will see some letters flickering Sorry, I don't think editing will send notifications and I think this is an important issue |
https://i.gyazo.com/1ccc584f1746d0fc342f6de6609d33f0.mp4 I am having the same issue... (around 0:04 you see a tile flicker) |
After much testing, I am confident that my issue (#15113) is the same as this one. What's odd is a couple things:
|
Also, FWIW, this did not occur at all in 2.1 with the exact same project. |
Would be nice to have an example project that reproduces the issue (I know it should be easy to make based on the given steps to reproduce, but engine dev time is a scarce resource :)). |
You may need to run the project a few times before seeing it, but once it's started, just let it sit and you should eventually see it. |
I tried multiple things to see if it happened in different scenarios. I could only reproduce it when a Camera2D was a child of a YSort. That might be a clue. |
I've seen this yesterday in the kinematic_char demo :\ |
What I've found about this problem is that:
|
See #16277 for another example project that should reproduce the issue. |
See 16280 for another issue regarding this. |
At least in my experience, this seems to be resolved in the stable godot
3.0 release.
…On Sun, Feb 4, 2018, 2:56 AM Archeia ***@***.***> wrote:
Hello, to add to this and just to clarify, I haven't done anything at all
with Godot and I just tried out this project specifically since I was
curious:
[image: image]
<https://user-images.githubusercontent.com/6222499/35776735-0b413ce2-09dd-11e8-81cc-be7a097d61cd.png>
Interestingly, I don't get this problem with the 2D Kinematic Character
Demo
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9913 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABW9yzPGCmyxZONEuNXLFKU_PtY3ADsvks5tRYzmgaJpZM4OlRVq>
.
|
@jonbonazza I used the latest stable godot3 and it still happens. My image shows it on upper right corner too T_T) It seems this bug happens on Nvidia graphic cards that are above GTX 970M? |
GeForce GTX 970 here. |
Here are some of my findings and a simple project to reproduce this issue. (a tilemap with 2 different sprites, the godot icon and the godot icon with inverted colors, with labels above the tilemap, scene that was converted to tileset is included)
Edit: Heres a screenshot of the issue. You can see 2 E's of the first line weirdly stretched across one tile section of the tilemap. (red) The labels stop flickering once the tilemap is removed from the scene. I hope this is going to help resolving this issue. |
45ab9cd Could not reproduce on Nvidia GTX 760 with Debian or Win7. |
Flickering is present with a GTX 1060 on Win7 for me. I really hope this gets fixed very soon because as it is now, TileMap is simply not usable for production. :( |
I think a fix would be needed if there were hundreds of people reporting this problem. I don't think we have that. At least this thread is not suggesting it. That said, if there are some commercial releases that are suffering from this it might be good to help them out. If I had more experience I would dive in myself, but I would not know where to begin. I have just started exploring the Godot code, which is very well written by the way. This is where it would be nice to have a voting system for crucial bugs that need to be fixed. My vote is to wait for 4.x, and have resources focused on that. We know Vulkan already solves this problem. |
In my experience, voting is generally not conductive to getting bugs fixed faster. This is true in community-developed projects, but even commercial proprietary software faces the same issue (look at Discord's feature tracker). |
True. I am not suggesting it would help get it fixed. It would be more of a gauge on how wide spread the problem is. I suppose the number of people involved in this discussion could be a gauge. At any rate, I am pretty much done with this thread, and will patiently wait for 4.x |
I'm also facing the issue. I never faced it when autotiling normally. If I drew the map by hand ( which I did in another project, using the same tilemaps ) I never came across this issue. But when I came to render a procedurally generated dungeon using tilemap.set_cellv( ... ) I encountered the issue consistently. I all suggestions, and the only one that worked was using GLES2 with the workaround. This is a pretty serious issue though! Most basic tilemap rendering is failing. Why isn't there a workaround for GLES3 btw? I know some OpenGL, I've written a basic game engine that renders textures with shaders but nothing more. Can someone explain what's causing this exactly? Hopefully I can understand. <3 |
There are already some explanations on this thread. I suppose that at this point there won't be new workarounds or fixes for this issue until the 4.0 (vulkan) release, unless the community comes up with something. IMHO the maintainers are correct in not worrying with a potentially complex fix now that 4.0 is on the horizon. |
I hadn't actually noticed that, I might have a go at porting the workaround code to GLES3 tomorrow. It will be slow though if we can get it working. |
I've now got a WIP PR (see above) for the workaround for GLES3. I've also got some ideas for fixing the uniform drawing method, as the shader seems overcomplicated for what is needed. I might need some help testing that if I do a fix, as I can't repeat the flickering on my machine. |
I think I can help with that. I should be able to do a custom Windows build on your PR. |
I'm now working on rewriting the fast path shader to prevent flicker. I now have a prototype available for trying in #38628. I would greatly appreciate if someone could try it out who has hardware that exhibits flicker, instructions are in the PR. |
Well update:
So currently I'm thinking in terms of it being some weird situation in terms of binding failing on our side only on nvidia, or a driver bug (maybe not envisaging this method of drawing perhaps, or not testing it?). Anyway the good news is that
At this stage, I think my time would be more productively spent getting some batching working in GLES3, which would make the performance difference moot. 👍 |
@lawnjelly It's is a driver bug and how it deals with power managment. In this comment you can find my findings. |
Ahha! 😁 One of the problems is this thread has become so long now! Actually API trace is a very good way of determining this if you get the flicker on your hardware, and I'm in agreement if you get different results each time you replay the trace that does point to a driver bug. 👍 |
@securas Did you ever confirm that the issue in the video you posted was being caused by this flicker bug? I'm seeing similar single frames of black background + horizontal white lines in my own project with both the built-in camera drag feature and a custom camera script, and none of the mentioned workarounds (GLES2, NVIDIA flicker fix, disable HDR, various different kinds of viewport allocation) prevent it from happening: This is on 3.2.1 stable, Windows 10, GTX 1080. The scene has four 1400x800 tilemaps stacked on top of eachother for the black far background, zigzag near background, foreground and camera collision. I'd be much obliged if anyone can offer some insight - writing a robust workaround is going to be a considerable chunk of project time that I'd rather not commit to if it can be avoided. |
If I remember correctly, it was due to 2d pixel snapping set to off. |
@Shfty That actually looks like it may be a different issue. That would seem to be confirmed if the nvidia workarounds don't fix it. Would you be able to open a new issue, with hardware details and a min reproduction project? |
@lawnjelly That sounds about right. I've opened #39720 with a minimal reproduction project based on the scene in the above gif. I managed to fix the issue by nesting the affected scene inside its own Viewport node, so have included an example setup for that inside the project as well. |
That gif looks to me like vertical synchronization/screen tearing in a way. |
So, things have been improved significantly with the upcoming Godot 3.3, so this can likely be closed as fixed. Godot 4.0 will likely not suffer from this issue as it's OpenGL specific and so far the 4.0 branch uses only Vulkan (if some form of this issue comes up again after OpenGL 3.3 support is re-implemented, it will likely be best to track it in a dedicated issue anyway as the code will be quite different). In 3.3, there is now batching enabled by default for GLES2 and GLES3, which fixes this issue. The issue can still happen with some non-default configuration:
|
Operating system or device - Godot version:
Windows 10, godot3.0alpha1
Issue description:
I made a kinematicbody2D and a tilemap, moving the kinematic body around worked as normal however occasionally one of the tiles on the tilemap would vanish faster than any screen recording software could capture. sometimes 2 would vanish, they would get redrawn however
Steps to reproduce:
Make a tilemap, load some tiles in, make a kinematic body
move the body around the game, keep your eyes open, dont blink, watch as some tiles vanish from rendering and quickly come back
The text was updated successfully, but these errors were encountered: