Skip to content

Fix SpotLight and OmniLight cull masks not working in mobile renderer#86105

Closed
jsjtxietian wants to merge 1 commit into
godotengine:masterfrom
jsjtxietian:fix-omni-mobile-cull
Closed

Fix SpotLight and OmniLight cull masks not working in mobile renderer#86105
jsjtxietian wants to merge 1 commit into
godotengine:masterfrom
jsjtxietian:fix-omni-mobile-cull

Conversation

@jsjtxietian

Copy link
Copy Markdown
Contributor

Fixes #82263

I'm not sure whether there's any unexpected impacts that prevents us from adding it at the first place, feel free to correct me.

@jsjtxietian jsjtxietian requested a review from a team as a code owner December 13, 2023 04:43
@akien-mga akien-mga added bug topic:rendering cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Dec 13, 2023
@akien-mga akien-mga added this to the 4.3 milestone Dec 13, 2023
@BastiaanOlij

BastiaanOlij commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

Hmm, this seems like a stopgap measure. In the mobile renderer the layer mask should already be applied during the culling stage as lights are paired with the objects they illuminate. A light should never end up being paired to an object if the layer mask doesn't match. Double checking it in the shader should yield no difference, only introduce more overhead.

If there are objects lit by lights that shouldn't light it, then there is an issue in the culling system.

@jsjtxietian

jsjtxietian commented Dec 18, 2023

Copy link
Copy Markdown
Contributor Author

In the mobile renderer the layer mask should already be applied during the culling stage as lights are paired with the objects they illuminate.

Interesting, so the real bug is lying in the cpu code, that does explains why it can cull the object in the first place, but after the object moves it stops working. I will take a look.

@jsjtxietian jsjtxietian marked this pull request as draft December 18, 2023 07:50
@AThousandShips AThousandShips modified the milestones: 4.3, 4.4 Jul 7, 2024
@AThousandShips AThousandShips added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Jul 25, 2024
@Repiteo Repiteo added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 24, 2025
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
@Repiteo Repiteo added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 5, 2025
@Repiteo

Repiteo commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

Superseded by #98266

@Repiteo Repiteo closed this Sep 5, 2025
@Repiteo Repiteo added archived and removed cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Sep 5, 2025
@Repiteo Repiteo removed this from the 4.5 milestone Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile/Compatibility: SpotLight and OmniLight cull masks don't cull moving meshes

5 participants