Detect and report if 2D particles use the screen SDF #69735
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This ensures that the SDF is updated even if not used in a canvas_item shader
Fixes an issue reported by Calinou in #48894 (comment)
In current master the screen SDF is only updated if there is a canvas_item shader visible that uses the SDF. We also need to update the SDF when a 2D particles node uses it for collisions. But this isn't checked as early in the pipeline, so we need to pass the
r_sdf_used
variable deeper into the pipeline to check.CC @Calinou