Disable interpolation and use variable FPS in GPUParticles by default #70777
+20
−16
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 fixes various issues caused by simulating particles at a low framerate (then interpolating the result), such as:
From testing on two different GPUs (GeForce GTX 1080 and Radeon RX 6900 XT), simulating particles at a lower framerate then interpolating the result had very little performance benefit in most cases.
Instead, it's better to enable interpolation and reduce simulation rate only when it provides a tangible performance benefit. This may be the case with 100,000+ particles, not so much with a few thousand particles.
One downside of variable-rate simulation is that collision response may vary slightly depending on the rendering FPS. This can be alleviated by using a high fixed FPS value (200 or more), but this can have a noticeable performance impact. In most scenarios, the visual difference is hardly noticeable unless you specifically look for it.
This also improves the documentation for
fixed_fps
andinterpolate
properties in GPUParticles2D and GPUParticles3D.This partially addresses #50824, #51318 and #70748.