godotengine / godotengine/godot
The 2D scene doesn't update the particles when using a mesh as the texture of a GPUParticles2D node.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in : 4.2 stable and in 4.1 stable.
### System information
Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz (12 Threads)
### Issue description
When using a GPUParticles2D node, and assigning a MeshTexture to it's texture (no matter the texture used, I will use a QuadMesh), any change made to the mesh (for example its image size) will not be present in the scene.
However, modifying several property (any trail properties, some visibility properties...) update the scene.
This is the same for the editor's scene and in game when doing "hot reload".
Note: When launching the project it work fine.
### Steps to reproduce
- Create a GPUParticles2D node
- Assign a ParticleProcessMaterial to its process material to see particles.
- Assign a MeshTexture to its texture.
- Assign a QuadMesh to the Mesh of the MeshTexture.
- Change the image size of the QuadMesh to be 5x5
Now the particle node should pop out some particles, but none appear.
- Now for example change the trail_lifetime properties (without even activating the trail)
Now particles do pop out.
### Minimal reproduction project (MRP)
[TestBug.zip](https://github.com/godotengine/godot/files/13929738/TestBug.zip)
Contributor guide
Research direction
Start with the attached TestBug.zip reproduction and trace the GPUParticles2D update path when its MeshTexture uses a QuadMesh. Verify changes such as the QuadMesh image size appear in the editor and during hot reload without changing an unrelated property such as trail_lifetime; confirm launch behavior still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100