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

Fix noise_direction variable used before initialized in particle shader when using turbulence with collisions #83881

Conversation

jsjtxietian
Copy link
Contributor

@jsjtxietian jsjtxietian commented Oct 24, 2023

Fixes #83858

And why do we not use R""(Raw String Literal) to replace continuous string += in particle_process_material ? Much cleaner and potentially faster.

@akien-mga
Copy link
Member

And why do we not use R""(Raw String Literal) to replace continuous string += in particle_process_material ? Much cleaner and potentially faster.

Most likely because this code is older than C++11 usage in the Godot codebase, and hasn't been modernized yet.

It could be changed, but since there are lots of fixes on particles code being done these days, I'd wait a bit to avoid breaking PRs and making the git blame unreadable at a time where it's important. But it could be a good refactor for 4.3.

@jsjtxietian jsjtxietian force-pushed the fix-generated-particle-shader-use-noise-direction-before-define branch from 6563e74 to d008f2a Compare October 24, 2023 09:45
@jsjtxietian jsjtxietian force-pushed the fix-generated-particle-shader-use-noise-direction-before-define branch from d008f2a to f388874 Compare October 25, 2023 04:38
@jsjtxietian jsjtxietian force-pushed the fix-generated-particle-shader-use-noise-direction-before-define branch from f388874 to 80f38a3 Compare October 25, 2023 09:34
…ader

when using turbulence with collisions, delete unused code
@jsjtxietian jsjtxietian force-pushed the fix-generated-particle-shader-use-noise-direction-before-define branch from 80f38a3 to cc14e00 Compare October 25, 2023 11:35
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for making so many changes

@akien-mga akien-mga merged commit 8835db5 into godotengine:master Oct 26, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the fix-generated-particle-shader-use-noise-direction-before-define branch October 26, 2023 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants