-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Polygon2D node not configured for AA as of 3.1 #26823
Comments
For me it never really worked in 2D (#12840) |
@starry-abyss you may notice I'm in that thread, I suggested 2 workarounds there (1 seen in OP's edit and another in the comments which they noted but never added) and I've noted both of those here. As I said in the issue description, if this is fixed I'll open a dedicated bug for that if it still persists. Sure it wasn't working out-of-the-box, but it least it was able to work. |
This is also quite annoying for people working in VisualScript, since it looks extremely ugly now. |
I am not getting that behavior, neither on GLES2 nor on GLES3, not even on 2.0 or 3.0 so it must be a hardware issue, since I get AA on my other computer. |
@Calinou: testing it now, I can confirm AA is working in the visual script editor (w/ GLES3 at least), but still not in my game itself. Also not in the project viewport, although that didn't work in 3.0.6 either so that's expected. For @Jummit, my GPU is a GTX 1050 Ti w/proprietary drivers (v418.56) on Antergos. If you're using integrated Intel graphics, then yeah I'm fairly sure AA was not working there even with the proper settings back in 3.0.6 (AMD+nVidia GPUs working fine, at least with desktop exports). |
I'm using polygons with AA in my project in 3.1. I found that Polygon2D doesn't antialias, but using draw_colored_polygon works when I disable HDR. |
Good point @lucaslcode, I can confirm with This and AA working in the VS editor likely means something with configuration is broken somewhere. In 3.0.6 if you got things working, there was inner AA only present on partially-transparent shapes, where something done incorrectly makes it show up as an outline (or glimmer with slow-moving objects)... even if AA was broken by HDR (but not in HTML). It is possibly related/similar to that. Or, maybe the checkbox in the editor is just broken. |
I've discovered this is an issue with how the Polygon2D node is configured, caused by changes made by @reduz (info in top edit). I'm not sure how easily this can be fixed, but it might need someone who understands rendering (or just reduz himself). Although if anyone could point me towards a rigged polygon skeleton2D example/template (one with dynamic motion like animations would be great), it would allow me to test how the lazy fix (pasting old lines in) works with that. |
Polygon2D: The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing. Line2D: Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly. Fixes godotengine#26823
Polygon2D: The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing. Line2D: Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly. Fixes godotengine#26823
EDIT 2: I've discovered this issue is caused by changes to
scene/2d/polygon_2d.cpp
, changes introduced in a 2018 May commit by reduz (skeleton for 2D WIP).Before (line 200):
After (line 277):
Aside from the obvious lack of the
antialiased
option in the newer line, it's also usingcanvas_item_add_triangle_array
which was also used before 3.0, and there are 3 of theget_singleton
lines that look like they should have all options.Tacking
antialiased
to the existing lines doesn't work (it will actually break them in 2 of the 3, even if set tofalse
instead). Just replacing all 3 lines with the older line does bring AA back, but obviously that breaks the 3.1 changes.I suspect that reduz configured the 3.1 polygon2D node specifically for character animation (skeletons and internal vertices) whilst thinking 3.0's AA was flat broken (like I've said elsewhere, it works with disabled HDR and/or setting 2D framebuffer allocation), so it's not exactly a regression and I'm guessing things would need to be at least slightly reworked for AA to work with reduz' changes.
EDIT: Still present as of 3.2 alpha 3. AA enabled via gdscript drawing works fine, so it seems to be just the checkbox in the editor that is broken.
(below is the original issue info, which is less correct/relevant than the above)
It just doesn't work anymore. Tested on Linux+nVidia and W10+AMD (different hardware), so I don't think this is a compatibility issue. Also happens both with GLES3 and GLES2 renderers.
This is a regression present even in 3.1 alpha 1, so the change that resulted in this was likely made in the master branch between 3.0.6 and alpha 1. This directly relates to issue #10241 in that this issue is a regression on the progress to fulfill it... although after this issue is fixed AA will still need to be implemented on line2D for 10241 to be fulfilled.
This still affects 3.1 RC 1.
Notes:
AA in 3.0.6 conflicted with HDR (which was on by default). Turning HDR off in the project settings was needed for AA to work, aside from on nVidia hardware where HDR could be on if the framebuffer was explicitly set to 2D. That might be related or might need to be a separate issue (I'll make it if it still occurs after AA comes back). Inner AA seemed to still work with partially transparent shapes, so the issue with HDR and/or 3D framebuffer was likely an issue with passes.
AA for HTML5 in 3.0.6 didn't work at all, and I have no idea about MacOS, iPhone, Android, Blackberry etc.
Hopefully this is an accidental breakage, but I can understand if this cannot be fixed until the renderer is adapted to use Vulkan. And it's somewhat made better by the fact that 3.0.6 can still be used, albeit while missing features/fixes.
This issue is also related to (less important) issue #25120 in that both related to polygonal art.
The text was updated successfully, but these errors were encountered: