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

Fix 2d sdf collision for TileMapLayer Occluders #92173

Merged
merged 1 commit into from
May 21, 2024

Conversation

cosparks
Copy link
Contributor

@cosparks cosparks commented May 20, 2024

Proposed fix for #91907 and #92052.

Before this PR went in, the 2d rendering system ignored the sdf collision flag on 2d light occluder instances and always drew light occluder polygons to the sdf texture. Now, occluders aren't drawn to the texture when sdf collision is false.

Apparently, TileMap and now TileMapLayer have both been impacted by this fix, as setting the sdf collision flag for their occlusion layers doesn't actually update the underlying light occluder instance (even though it should). This change fixes that, so now the sdf collision field of a TileMapLayer's occlusion layer dictates whether or not it's drawn to the sdf texture:

closes #91907
closes #92052.

@cosparks cosparks requested a review from a team as a code owner May 20, 2024 20:23
@KoBeWi KoBeWi added this to the 4.3 milestone May 20, 2024
@akien-mga akien-mga requested review from clayjohn and groud May 21, 2024 06:26
@akien-mga akien-mga merged commit 365d25d into godotengine:master May 21, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@cosparks cosparks deleted the fix-tilemap-occluder-sdf branch May 22, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants