-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 GPUParticles2D ignoring AtlasTexture region #64701
Fix GPUParticles2D ignoring AtlasTexture region #64701
Conversation
Out of curiosity, do you know if a similar approach can be used for GPUParticles3D? |
@Calinou The problem is that GPUParticles3D and CPUParticles3D are using regular meshes with normal materials, so the logic would have to go in BaseMaterial3D. As BaseMaterial3D supports many different kind of textures (normal, detail, roughness,...) I think this would get quite complicated or it wouldn't be feasable at all since you can't guarantee that every texture is an AtlasTexture. |
It won't work for AtlasTextures with margins. To properly take margins into account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the behaviour of CPUParticles2D and is a big improvement over doing nothing.
To properly take margin into account, we will need to make further changes to how UVs are computed by both CPUParticles2D and GPUParticles2D, but that can be done in another PR
Needs rebase. |
353b6af
to
73bbcae
Compare
Rebased. |
Thanks! |
My condolences! |
Fixes #13923.
Also fixes GPUParticles2D's texture not updating in some cases.