Improve 2D Particle Emission Mask dialog #101165
Open
+379
−136
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.
In this PR I reworked the 2D particles emission mask dialog (C/GPUParticles2D → Load Emission Mask in the 2D viewport).
Screencast.From.2025-01-05.23-34-47.mp4
Before, it was only possible to let Godot generate an emission direction texture when using the "Directed Border Pixels" mode. With this PR, you can specify a custom normal map to use. Additionally, the "Centered" checkbox is now checked by default because all other emission shapes are also centered by default.
I refactored some code as well because I found some parts of it hard to read and understand due to undocumented abbreviations.
If you want to test this, make sure to also merge #101162 because emission mask textures are currently broken for GPUParticles2D.