-
-
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
Make YSort stable #42375
Make YSort stable #42375
Conversation
Keeps track of the order in which items are collected by _collect_ysort_children, and uses that order to break ties between items with similar Y positions.
This is extremely likely to conflict with #42282. I'm marking this as a draft for now to avoid accidental merging. |
And this is extremely likely to be merged first, so there's not reason to do that. |
As this is the solution that we discussed and approved on IRC, merging. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
Thanks! Hopefully the first of many. 😄 |
Actually, the code for the current version of #42282 does not modify RenderingServer at all, which means these changes should be completely independent and will work on top of each other. Also congrats! |
Cherry-picked for 3.2.4. |
@Skuriles: Is this something that worked differently before the patch? I've observed that using multi-cell tiles with YSort is really tricky -- especially if the tiles don't fill the cells completely -- and it's something that I want to take another look at once godotengine/godot-proposals#1769 is implemented. |
@Pennycook in Godot 3.2.3 it was completely random (some tiles were shown above the other, some not even if they were from same tilemap). No the randomness is gone, but it still does not work for tiles with more than one cell. Im fact: I had some hope to use tilemaps to just place floor, walls and all static objects from tilemaps, but this won't work. I gave up using Y-Sort with tilemaps and only render the floor and and outer walls by tilemaps. Everything else will be a StaticBody or similar object. |
@Skuriles Have you tried setting Tile Origin to "Bottom Left" for tilemap with bigger tiles? |
@Skuriles: I think this has been fixed by #48918. You can now set the offset and Y-Sort origin of individual tiles to any value you'd like, and in the testing I've done so far with big tiles everything seems to work. @Calamander: Do you still see this behavior with the new TileMap editor? I'm having trouble reproducing it there. |
@Pennycook which one is new TileMap? Groud's or 3.3.2?.. |
@Calamander: Groud's, I'm guessing. |
Yes, sorry -- I meant Groud's. My thinking: if the issue is fixed in the new editor, it might be easier to identify why it isn't working in the old editor. |
@Pennycook Does Godot 4.0 use Vulkan 1.2? I can't seem to run it and my videocard doesn't support Vulkan 1.2 while it does support 1.1 so I guess I can't test it. |
IIRC, it requires Vulkan 1.0 and optionally uses Vulkan 1.1 features. However, Intel Haswell IGPs are not supported because they don't fully support Vulkan 1.0 in the first place. Any Intel IGP after Haswell should work (Broadwell and later). |
@Calinou Hmm, I have GeForce 660M (with latest available driver installed). Vulkaninfo shows my api version as 1.1.95 so then it should probably be enough. I initially thought that problem lies with Vulkan because it crashes before opening project manager right after reporting errors about unfreed shaders and shows nothing else, even in verbose mode. I guess I'll try compiling and running editor myself sometime later to see if I can determine the cause of the crash. |
Keeps track of the order in which items are collected by
_collect_ysort_children
, and uses that order to breakties between items with similar Y positions.
Closes #33230.