Implement Particle Trails

-Enable the trails and set the length in seconds
-Provide a mesh with a skeleton and a skin
-Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh
-Works deterministically
-Fixed particle collisions (were broken)
-Not working in 2D yet (that will happen next)
This commit is contained in:
reduz 2021-04-27 12:43:49 -03:00
parent 0ad03ba052
commit 90056460ad
33 changed files with 1576 additions and 180 deletions

View file

@ -235,6 +235,7 @@ public:
FLAG_USE_TEXTURE_REPEAT,
FLAG_INVERT_HEIGHTMAP,
FLAG_SUBSURFACE_MODE_SKIN,
FLAG_PARTICLE_TRAILS_MODE,
FLAG_MAX
};
@ -305,16 +306,15 @@ private:
uint64_t roughness_channel : get_num_bits(TEXTURE_CHANNEL_MAX - 1);
uint64_t emission_op : get_num_bits(EMISSION_OP_MAX - 1);
uint64_t distance_fade : get_num_bits(DISTANCE_FADE_MAX - 1);
// flag bitfield
uint64_t feature_mask : FEATURE_MAX - 1;
uint64_t flags : FLAG_MAX - 1;
// booleans
uint64_t deep_parallax : 1;
uint64_t grow : 1;
uint64_t proximity_fade : 1;
// flag bitfield
uint32_t feature_mask;
uint32_t flags;
MaterialKey() {
memset(this, 0, sizeof(MaterialKey));
}