summaryrefslogtreecommitdiff
path: root/scene/resources/particles_material.h
AgeCommit message (Collapse)Author
2022-08-02Rename ParticlesMaterial.turbulence_active to turbulence_enabledFireForge
2022-07-28Turbulence Noise for Particle MaterialRaffaele Picca
2022-06-20Clean up Hash Functionsreduz
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better)
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-03-18Merge pull request #55399 from RPicster/particlesmaterial-sphere-emittershapeRémi Verschelde
ParticleMaterial: Sphere emission shape emitting from the volume.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-06Fixed sphere emission shape to emit particles in a spheres volume and added ↵Raffaele Picca
"Sphere Surface" to keep the old behaviour.
2021-12-03Random initial color parameter for ParticleMaterialRaffaele Picca
Works with 2D and 3D GPU Particles
2021-09-21Prevent shaders from generating code before the constructor finishes.Tom Coxon
Fixes #43733: "creating SpatialMaterial in a separate thread creates invalid shaders (temporarily)." The bug occurred because various setters called in materials' constructors add materials to queues that are processed on the main thread. This means that when the materials are created in another thread, they can be processed on the main thread before the constructor has finished. The fix adds a flag to affected materials that prevents them from being added to the queue until their constructors have finished initialising all the members.
2021-08-22moved particle parameters to minmax and split scale axisQbieShay
This commit adds quite a chunk of modifications to particles - particle (value + randomness) now use min and max instead - passing a curveXYZtexture is now possible and will scale particles per-axis - CPUParticle3D have an optional parameter to split the scale curve per-axis
2021-08-18Adjust the material key bit size for ParticlesMaterialYuri Sizov
2021-08-12Use real_t and double where appropriate in ParticlesAaron Franke
2021-07-11This commits adds a new emitter type for particles materialQbieShay
and 3D CPU particles. The new emitter is called "ring" and it can emit either in a ring or cylinder fashion. This adds the following properties for the emitter: 1. emission_ring_axis: the axis along which the ring/cylinder will be constructed 2. emission_ring_radius: outer radius of the ring/cylinder 3. emission_ring_inner_radius: inner radius of the cylinder. when set to zero, particles will emit in the full volume. 4. emission_ring_height: height of the ring/cylinder emitter.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-06Added ability to visualize native shadersreduz
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
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-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-09Implement GPU Particle Collisionsreduz
-Sphere Attractor -Box Attractor -Vector Field -Sphere Collider -Box Collider -Baked SDF Collider -Heightmap Collider
2020-09-11doc: Sync classref with current sourceRémi Verschelde
Bind missing enums.
2020-09-06Implement manual particle emission and particle sub emitters.reduz
2020-07-10Add override keywords.Marcel Admiraal
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-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-01-16Validate input in (CPU)Particles set_emission_shape()Rémi Verschelde
Fixes #29777. Co-authored-by: Cameron Reikes <cameronreikes@gmail.com>
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-07-14added individual particle random lifetimeclayjohn
2019-07-02Merge pull request #26613 from KoBeWi/direction_of_particlesRémi Verschelde
Add a Direction property to ParticlesMaterial
2019-06-26Add a Direction property to ParticlesMaterialTomasz Chabora
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-21Moved dirty material lists from static to lifetime controlled by main.Ibrahn Sahir
As with 7d82bed4f4cac8f5227d935c0496290e24eb48c8, The list is now destroyed before the OS object, so can print errors if there are unfreed materials.
2018-11-04Remove animation loop from ParticlesMaterial + improvements to CPUParticles2DJFonS
Remove animation loop from ParticlesMaterial and move it to SpatialMaterial for 3D particles and Particles2D for the 2D case. Added animation to CPUParticles2D as well as the "Convert to CPUParticles2D" to the PAarticles2D menu.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-04Move ParticlesMaterial code to its own resource fileRémi Verschelde
It's shared by both 2D and 3D particles (+ CPU ones), so it makes sense to have as a common resource. It also allowed to disable compilation of Particles (3D) when using 'disable_3d'. Also cleaned up includes in SpatialEditorGizmos and some other places, as well as dropped dead code in material_editor_plugin.cpp.