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

Deprecate redundant fract_delta property in GPUParticles #55743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Dec 8, 2021

This property was made redundant by the addition of interpolation in GPUParticles. It's now always enabled.

CPUParticles still features a fract_delta property for now. Should we remove it as well?

See discussion on the Godot Contributors Chat.

@Calinou Calinou requested review from a team as code owners December 8, 2021 22:53
@Calinou Calinou added this to the 4.0 milestone Dec 8, 2021
@lawnjelly
Copy link
Member

lawnjelly commented Jan 15, 2022

CPUParticles still features a fract_delta property for now. Should we remove it as well?

Note that #52846 now uses the fract_delta for the timing calculations for "streaking" in interpolated CPUParticles (in 3.x but will likely be ported to 4.x). Streaking is using the fract_delta to back-calculate a "primed" position for restarting particle so they appear on an infinite timeline, rather than bunched up at update times only. I'm actually banditing the fract_delta property to also turn on and off streaking (rather than creating another specific property), I don't know what else fract_delta currently turns on / off.

I haven't yet investigated how the GPUParticles work or whether they could also do streaking (I'm sure it would be welcome there too if we can do it, although it doesn't have to be part of the interpolation PR). I don't know yet how the interpolation works in 4.x, whether it already can do this.

@YuriSizov YuriSizov modified the milestones: 4.0, 4.x Feb 9, 2023
@MJacred
Copy link
Contributor

MJacred commented Oct 26, 2024

@lawnjelly: fixed timestep interpolation for Godot 4 was implemented (#92391, #91818). A code search on Github says that fract_delta is unused.
Is there still sth. missing for Godot 4? If not, this property seems to remain redundant and could therefore be removed

@Calinou
Copy link
Member Author

Calinou commented Oct 26, 2024

Rebased and tested again, it works as expected. This now preserves compatibility by deprecating the property and hiding it from the inspector instead of removing it entirely.

A code search on Github says that fract_delta is unused.

fractional_delta (and its resulting shader constant USE_FRACTIONAL_DELTA) were still used though. fract_delta is only used in the property names; all methods use fractional_delta instead.

I still think the property can be deprecated as I don't see any use cases to disabling it (unlike interpolation, which you may want to disable to sidestep rendering issues or have a retro look).

This property was made redundant by the addition of interpolation
in GPUParticles. It's now always enabled and hidden in the inspector.

CPUParticles' `fract_delta` property is still effective after this change.
@Calinou Calinou force-pushed the particles-remove-fract-delta branch from 692ca8e to 438329f Compare October 26, 2024 16:38
@Calinou Calinou changed the title Remove redundant fract_delta property in GPUParticles Deprecate redundant fract_delta property in GPUParticles Oct 26, 2024
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.

4 participants