summaryrefslogtreecommitdiffstats
path: root/scene/3d/cpu_particles.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Renamed 2D and 3D nodes to make their types explicitJuan Linietsky2020-03-271-1546/+0
| | | | Fixes #30736.
* Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-5/+3
| | | | | | | | | Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-105/+82
| | | | | | | | | | | | | | | | 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`.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-33/+33
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-3/+3
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-26/+26
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fixed 2D and 3D CPU ParticlesJuan Linietsky2020-02-111-15/+15
|
* More GIProbe work and fixesJuan Linietsky2020-02-111-1/+1
|
* Modernized default 3D material, fixes material bugs.Juan Linietsky2020-02-111-5/+5
|
* Several fixes to 3D rendering, and multimesh implementation.Juan Linietsky2020-02-111-2/+2
|
* Validate input in (CPU)Particles set_emission_shape()Rémi Verschelde2020-01-161-1/+5
| | | | | | Fixes #29777. Co-authored-by: Cameron Reikes <cameronreikes@gmail.com>
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Fixed disconnecting not connected signalMikolaj Kaczmarek2019-10-291-1/+3
|
* Fixed emitting not initialized correctly in cpu particles 2d/3dPouleyKetchoupp2019-10-241-2/+4
| | | | Fixes uninitialized variable caused by PR #32921
* Fixed delay when CPUParticles & CPUParticles2D start being emittedPouleyKetchoupp2019-10-201-73/+95
| | | | | | Particles were processed only on the next frame after the emission started, causing a one frame delay in rendering. Now the first process cycle is started during the same frame, which makes them consistent with Particles & Particles2D. Fixes #32890
* Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde2019-09-251-3/+3
|\ | | | | Added some obvious errors explanations
| * Added some obvious errors explanationsqarmin2019-09-251-3/+3
| |
* | fix particles scale randomizationclayjohn2019-09-241-2/+2
|/
* Merge pull request #30576 from qarmin/lgtm_coverageRémi Verschelde2019-07-201-3/+0
|\ | | | | Changed some code reported by LGTM and Coverity
| * Changed some code showed in LGTM and Coverageqarmin2019-07-201-3/+0
| |
* | added individual particle random lifetimeclayjohn2019-07-141-0/+20
|/
* cpu_particles: Return uniform density spheres.Simon Puchert2019-07-061-1/+3
| | | | | The current implementation normalizes points from a uniform distribution on a cube. This creates a non-uniform distribution on the sphere.
* Merge pull request #26613 from KoBeWi/direction_of_particlesRémi Verschelde2019-07-021-4/+20
|\ | | | | Add a Direction property to ParticlesMaterial
| * Add a Direction property to ParticlesMaterialTomasz Chabora2019-06-261-4/+20
| |
* | Merge pull request #29937 from clayjohn/particles-one-shot-bugRémi Verschelde2019-06-271-1/+2
|\ \ | | | | | | Update emitting status on one-shot particles
| * | update emitting status on one-shot particlesclayjohn2019-06-251-1/+2
| | |
* | | Merge pull request #29974 from clayjohn/particles_restartRémi Verschelde2019-06-241-0/+2
|\ \ \ | | | | | | | | Properly set emitting when particles restart
| * | | properly set emitting when particles restartclayjohn2019-06-211-0/+2
| |/ /
* | | CPUParticles: Set linear velocity to 0, like GPU ParticlesRémi Verschelde2019-06-211-1/+1
| | |
* | | Particles: Properly initialize angular velocity parameterRémi Verschelde2019-06-211-0/+1
|/ / | | | | | | | | Right now it would take garbage values when loading scenes, which could end up written to the scene file.
* | Merge pull request #29700 from clayjohn/cpuparticles_transform_bugRémi Verschelde2019-06-161-7/+49
|\ \ | | | | | | Fix CPU particles bug with local_coords and transform
| * | fix CPU particles bug with local_coords and transformclayjohn2019-06-141-7/+49
| | |
* | | Implement missing orbit velocity for CPUParticles and CPUParticles2DRémi Verschelde2019-06-131-23/+19
| | | | | | | | | | | | | | | | | | | | | The relevant code was copied from (GPU) ParticlesMaterial but commented out initially, and never ported. Closes #29580.
* | | Merge pull request #29696 from akien-mga/cpuparticles-randomnessRémi Verschelde2019-06-121-4/+11
|\ \ \ | | | | | | | | CPUParticles: Do randomness ratio computations in phase instead of time
| * | | CPUParticles: Do randomness ratio computations in phase instead of timeRémi Verschelde2019-06-111-4/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original shader code uses a phase (ratio from 0 to 1 for the particle lifetime) for the randomness ratio computations, and this code was ported over but converted to time computations. The seeding/cycle logic was thus invalid, so we're going back to phase for these computations, thus fixing the previous non-working time/emission randomness property. Part of #29692. Follow-up to #26859.
* / / CPUParticles: Fix inconsistent tangential accelerationRémi Verschelde2019-06-111-2/+3
|/ / | | | | | | | | | | | | The tangential acceleration for both CPUParticles2D and CPUParticles had been badly converted from their GPU counterpart (ParticlesMaterial). This fixes it and ensures that both GPU and CPU particles behave the same with regard to tangential acceleration.
* | Tweak the particle animation node configuration warning messageHugo Locurcio2019-05-251-1/+1
| |
* | Make multimesh invisible initially in CPUParticlesDaeil Kim2019-04-241-0/+1
| | | | | | | | Fixes #28252
* | Ensure non-emitting particles not processed on entering treeDaeil Kim2019-03-201-4/+6
| | | | | | | | | | Also removed non-active CPUParticles(3d) from render list Fixes #27066
* | Fix resetting of CPUParticles (2D and 3D)JFonS2019-03-101-3/+3
| |
* | Prevent invisible/inactive cpuparticles to redraw(3d)Daeil Kim2019-03-091-46/+30
|/
* allowing setting particles lifetime greater than 600clayjohn2019-02-181-1/+1
|
* Appease some CppCheck warns for files in the "scene" directoryMichael Alexsander Silva Dias2019-01-161-8/+3
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #24051 from Omicron666/patch-1Rémi Verschelde2018-12-031-1/+1
|\ | | | | Fixes typo in source string sent to translation.
| * Fixes typo in source string sent to translation.Omicron2018-11-291-1/+1
| | | | | | no mesh has ~~not~~ been assigned
* | Merge pull request #24007 from JFonS/fix_cpuparticles_scaleRémi Verschelde2018-12-021-4/+4
|\ \ | |/ |/| Fix "scale" property collision in CPUParticles
| * Fix "scale" property collision in CPUParticlesJFonS2018-11-301-4/+4
| |
* | Fix many errors found by PVS-StudioAaron Franke2018-11-281-4/+4
|/ | | Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.
* Fixing wrong type hint on CPUParticles and CPUParticles2D's color rampItalo Vieira2018-11-231-1/+1
| | | | Fixes #22795