Skip to content
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

Flashing black squares when MSAA enabled. #228

Open
kubajz22 opened this issue Dec 23, 2020 · 5 comments
Open

Flashing black squares when MSAA enabled. #228

kubajz22 opened this issue Dec 23, 2020 · 5 comments
Labels
bug Something isn't working Need more info Waiting for Godot Godot has a bug and should be fixed first

Comments

@kubajz22
Copy link

Describe the bug
When you enable MSAA the terrain gets covered with these black squares which randomly appear and disappear. It doesn't matter the MSAA power but higher antialiasing seems to make the glitching appear more frequently.

To Reproduce
Create a terrain and enable MSAA.

Environment

  • OS: Linux Mint 20
  • Graphics card GeForce1650
  • Godot version 3.2.3
  • Plugin version 1.4 (this issue wasn't mentioned in 1.5.x changelog)
  • Renderer used: GLES3

Video
https://youtu.be/7VLR4GFhhGk

@Zylann
Copy link
Owner

Zylann commented Dec 23, 2020

This is screaming "Godot renderer bug" or "Graphics driver bug"... it's not the first time I've seen this happen, a variant of this occurs here #149

To my knowledge, there is nothing I can do in the plugin to fix this. It's gotta be reported to Godot, unfortnately I have no idea what it takes to make a simple reproduction project. If you manage to reproduce this in a minimalistic project it could help Godot devs to figure out what it is.

Do you have SSR enabled?

Also, I just tried on the demo, which only contains a terrain, some water planes and grass: https://github.com/Zylann/godot_hterrain_demo
With MSAA x2 and x4, it did not happen. I have a GeForce GTX 1060 6GB/PCIe/SSE2 on Windows 10.

@Zylann Zylann added bug Something isn't working Waiting for Godot Godot has a bug and should be fixed first Need more info labels Dec 23, 2020
@kubajz22
Copy link
Author

I turned SSR off and the issue was reduced significantly, apart from few black dots here and there. It seems to be related to the detail layer. When I hide all of them, the issue is no longer present. Detail layers aren't the only thing that is affected by this though. The squares appear on other objects too. I created a new project, enabled SSR and MSAA, added a detail layer and it was covered with black, though it wasn't flashing like in the video.
Now, it actually isn't truly random. In my other project, when I disable wind, I can pan the view and find a spot where it goes black and it stays like this.

@Zylann
Copy link
Owner

Zylann commented Dec 24, 2020

In godotengine/godot#15527 reduz indicates it could be due to an exceeded number of texture samplers, which would be a limitation of your graphics card. If that's the case, the solution is to use less effects and lower-end shaders. It's only a supposition though.

@7Arz
Copy link

7Arz commented Feb 14, 2021

Apparently this works for me with detail shader.
ALBEDO = clamp(ALBEDO, 0.0, 1.0);

@Zylann
Copy link
Owner

Zylann commented Feb 14, 2021

That might workaround the symptoms, but something is still broken. Albedo should not be blowing up like that in the first place 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Need more info Waiting for Godot Godot has a bug and should be fixed first
Projects
None yet
Development

No branches or pull requests

3 participants