Skip to content

Refactor particle_process_material to use c++11 long string literals #105508

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

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

Conversation

Lcbx
Copy link
Contributor

@Lcbx Lcbx commented Apr 17, 2025

simple refactor of ParticleMaterial shader to use use c++ 11 long strings

In pratice, for blocks of > 3 lines, use :

code += R"(
    my;
    long;
    piece of code;
);

instead of

code += "    my;\n";
code += "    long;\n";
code += "    piece of code;\n";

tested by creating different ParticleMaterials, converting them to ShaderMaterial and diffing the generated code with stock Godot
( it adds some endlines, I don't think that matters overmuch)

@Calinou Calinou added this to the 4.x milestone Apr 18, 2025
@Lcbx Lcbx force-pushed the ParticleProcessMaterial_cpp11_long_string branch 2 times, most recently from 9a53b65 to f31b735 Compare April 18, 2025 20:37
@Lcbx Lcbx force-pushed the ParticleProcessMaterial_cpp11_long_string branch from f31b735 to 39c3aeb Compare April 18, 2025 20:39
@Lcbx
Copy link
Contributor Author

Lcbx commented Apr 18, 2025

took me a bit to realize that coding style check was tripping over inconsistent indentation.

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.

2 participants