summaryrefslogtreecommitdiff
path: root/scene/2d/cpu_particles_2d.cpp
AgeCommit message (Collapse)Author
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-27Rename more 2D and 3D nodes to follow conventionRémi Verschelde
Rename editor plugins to match the new node names.
2020-02-28Signals: Manually port most of remaining connect_compat usesRémi Verschelde
It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
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.)
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-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- 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.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-11Fixed 2D and 3D CPU ParticlesJuan Linietsky
2020-02-11Several fixes to 3D rendering, and multimesh implementation.Juan Linietsky
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-02-07Merge pull request #32496 from bitstopper/masterRémi Verschelde
Fixes broken CPUParticles2D AtlasTextures usage
2020-01-23doc: Misc updates for AnimationNode* and othersRémi Verschelde
- Add some missing descriptions. - Add links to tutorials for ARVR and AnimationTree. - Style fixes. - Engine changes: * Make `AnimationNodeTransition.input_<number>` properties internal so that they don't appear in the docs. They still appear in the inspector based on the actual number of inputs requested. * Drop unimplemented `CPUParticles.flatness`. It's only used for 3D particles in `ParticlesMaterial`, and thus only relevant for `CPUParticles3D`.
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-10-29Fixed disconnecting not connected signalMikolaj Kaczmarek
2019-10-24Fixed emitting not initialized correctly in cpu particles 2d/3dPouleyKetchoupp
Fixes uninitialized variable caused by PR #32921
2019-10-20Fixed delay when CPUParticles & CPUParticles2D start being emittedPouleyKetchoupp
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
2019-10-07Fixes broken CPUParticles2D AtlasTextures usagebitstopper
2019-10-02Revert "Fixes CPUParticles2D not making use of AtlasTextures"Rémi Verschelde
2019-10-01Fixes CPUParticles2D not making use of AtlasTexturesbitstopper
Fixes CPUParticles2D not making use of AtlasTextures #2
2019-09-25Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde
Added some obvious errors explanations
2019-09-25Added some obvious errors explanationsqarmin
2019-09-24fix particles scale randomizationclayjohn
2019-07-28toggle CPUParticles2D visibility when redrawingclayjohn
2019-07-20Merge pull request #30576 from qarmin/lgtm_coverageRémi Verschelde
Changed some code reported by LGTM and Coverity
2019-07-20Changed some code showed in LGTM and Coverageqarmin
2019-07-14added individual particle random lifetimeclayjohn
2019-07-06cpu_particles: Return uniform density spheres.Simon Puchert
The current implementation normalizes points from a uniform distribution on a cube. This creates a non-uniform distribution on the sphere.
2019-07-02Merge pull request #26613 from KoBeWi/direction_of_particlesRémi Verschelde
Add a Direction property to ParticlesMaterial
2019-06-30CPUParticles2D: Fix gravity to be the same as in Particles2D and Area2DRémi Verschelde
This was likely a typo, 10 times the standard gravity is 98.0665 (ca. 98), not 98.8.
2019-06-27Merge pull request #29937 from clayjohn/particles-one-shot-bugRémi Verschelde
Update emitting status on one-shot particles
2019-06-26Add a Direction property to ParticlesMaterialTomasz Chabora
2019-06-25update emitting status on one-shot particlesclayjohn
2019-06-24Merge pull request #29974 from clayjohn/particles_restartRémi Verschelde
Properly set emitting when particles restart
2019-06-21properly set emitting when particles restartclayjohn
2019-06-21CPUParticles: Set linear velocity to 0, like GPU ParticlesRémi Verschelde
2019-06-21Particles: Properly initialize angular velocity parameterRémi Verschelde
Right now it would take garbage values when loading scenes, which could end up written to the scene file.
2019-06-17change emit shape circle to sphere in CPUParticles2Dclayjohn
2019-06-16Merge pull request #29700 from clayjohn/cpuparticles_transform_bugRémi Verschelde
Fix CPU particles bug with local_coords and transform
2019-06-14fix CPU particles bug with local_coords and transformclayjohn
2019-06-13Implement missing orbit velocity for CPUParticles and CPUParticles2DRémi Verschelde
The relevant code was copied from (GPU) ParticlesMaterial but commented out initially, and never ported. Closes #29580.
2019-06-12Merge pull request #29696 from akien-mga/cpuparticles-randomnessRémi Verschelde
CPUParticles: Do randomness ratio computations in phase instead of time
2019-06-11CPUParticles: Do randomness ratio computations in phase instead of timeRémi Verschelde
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.
2019-06-11CPUParticles: Fix inconsistent tangential accelerationRémi Verschelde
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.
2019-05-19Fix typos with codespellRémi Verschelde
Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-03-20Ensure non-emitting particles not processed on entering treeDaeil Kim
Also removed non-active CPUParticles(3d) from render list Fixes #27066
2019-03-10Fix resetting of CPUParticles (2D and 3D)JFonS