summaryrefslogtreecommitdiff
path: root/scene/3d/cpu_particles_3d.cpp
AgeCommit message (Collapse)Author
2020-12-04Rename Particles/ParticlesMaterial "Flags" enum to "ParticleFlags"Aaron Franke
"Flags" was a bit too ambiguous, and in 3D it hid GeometryInstance.Flags
2020-10-01Merge pull request #38743 from arrowinaknee/node-config-warningsRémi Verschelde
Update all get_configuration_warning() to retrieve warnings from the parent
2020-09-23Fixes updating CPUParticles emmision shape valuesbooer
2020-08-09Fix 2D Particle velocity with directed emission maskPouleyKetchoupp
Changed CPU velocity calculation for EMISSION_SHAPE_DIRECTED_POINTS to follow the same logic as in the GPU version: mat2 rotm; rotm[0] = texelFetch(emission_texture_normal, emission_tex_ofs, 0).xy; rotm[1] = rotm[0].yx * vec2(1.0, -1.0); VELOCITY.xy = rotm * VELOCITY.xy; Now both CPUParticles2D & CPUParticles3D (z disabled) show the same results as their GPU counterparts and take the initial velocity settings into account.
2020-05-16Update all get_configuration_warning to retrieve warnings from the parentArrowInAKnee
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-01Merge pull request #38346 from jitspoe/master.fix_uninitialized_particle_paramRémi Verschelde
Fix custom w component being uninitialized on CPU particles.
2020-04-30Fix custom w component being uninitialized on CPU particles.jitspoe
(cherry picked from commit 38085f2f6982c491935a434bb45e358dbebe1714) (cherry picked from commit b9c280b73ff6a13ea490d2da0f2728bcef3038dc)
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30doc: Update classref with node renamesRémi Verschelde
A few extra renames for classes which were missed in last week's PRs.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.