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

Use angle_rand to calculate base_angle in particles process material #75999

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

clayjohn
Copy link
Member

Fixes: #49767

Using angle_rand for the random value ensures that the returned base_angle is the same in the start() function and in the process() function.

I also changed the base tex_angle to 1.0 to match the process() function. Without this change the base_angle was always 0 in the start() function which could lead to a different kind of snapping on the first frame.

@clayjohn clayjohn force-pushed the Particles-angle-rand branch from 2669d21 to 821917b Compare April 13, 2023 22:11
@clayjohn clayjohn requested review from a team as code owners April 13, 2023 22:11
@clayjohn
Copy link
Member Author

Updated to fix the base tex_angle in CPUParticles as well

@YuriSizov YuriSizov merged commit bd3286e into godotengine:master Apr 14, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@unfa
Copy link

unfa commented Apr 16, 2023

Sweet! I gotta test this in 4.0.3 :)

@clayjohn clayjohn deleted the Particles-angle-rand branch April 17, 2023 07:09
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.3.

@akien-mga akien-mga changed the title Use angle_rand to calculate base_angle in particles process material Use angle_rand to calculate base_angle in particles process material May 12, 2023
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.

Vulkan: GPUParticles3D angular velocity has jumps
4 participants