diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-14 19:02:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-14 23:45:57 +0300 |
commit | b5fe00d1ac43c16ec8f74d3ad7689599dfb2ef00 (patch) | |
tree | e2dcae056cde3c6eaa3bcaf2c1b9117a0a5e87a1 /source/blender/gpu/intern/gpu_draw.c | |
parent | f6107af4cf4d907495e2e9c18e5866fd1d420650 (diff) |
Cycles: restore Particle Info Index for now, keep it next to Random.
It seems to be useful still in cases where the particle are distributed in
a particular order or pattern, to colorize them along with that. This isn't
really well defined, but might as well avoid breaking backwards compatibility
for now.
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index d7e744951c4..61d57dee092 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1884,12 +1884,14 @@ static int gpu_get_particle_info(GPUParticleInfo *pi) if (ind >= 0) { ParticleData *p = &dob->particle_system->particles[ind]; - pi->scalprops[0] = BLI_hash_int_01(ind); + pi->scalprops[0] = ind; pi->scalprops[1] = GMS.gscene->r.cfra - p->time; pi->scalprops[2] = p->lifetime; pi->scalprops[3] = p->size; copy_v3_v3(pi->location, p->state.co); + pi->location[3] = BLI_hash_int_01(ind); + copy_v3_v3(pi->velocity, p->state.vel); copy_v3_v3(pi->angular_velocity, p->state.ave); return 1; |