Skip to content
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

Don't store instance transform origin in RD 3D renderer unless requested #76003

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

clayjohn
Copy link
Member

Fixes: #75549
Supercedes: #75788

GPUParticles3D that use world space disable the store_transform_cache property to ensure that the instance transform is not used in the scene shader (it is set to 0,0,0 and the transform comes from the particle). When using doubles builds we ignored this flag and stored the transform origin and precision property regardless of the value of store_transform_cache.

store_transform_cache is true for every other instance type, so this only affects GPUParticles3D that have local coordinates set to false (it is set to false by default)

Previously, when using doubles builds of the engine, instance transform was stored no matter what which caused world space particles to accumulate the instance transform twice
@cridenour
Copy link
Contributor

Can confirm this fixes #75549 and combined with #75462 gets all particles working in double precision!

@akien-mga akien-mga merged commit 0ec2be1 into godotengine:master Apr 13, 2023
@akien-mga
Copy link
Member

Thanks!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.3.

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.

GPUParticles3D double their position when using precision=double
4 participants