Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-14 19:02:28 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-14 23:45:57 +0300
commitb5fe00d1ac43c16ec8f74d3ad7689599dfb2ef00 (patch)
treee2dcae056cde3c6eaa3bcaf2c1b9117a0a5e87a1 /intern/cycles/kernel/geom
parentf6107af4cf4d907495e2e9c18e5866fd1d420650 (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 'intern/cycles/kernel/geom')
-rw-r--r--intern/cycles/kernel/geom/geom_object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/geom/geom_object.h b/intern/cycles/kernel/geom/geom_object.h
index a63d180d450..32aa2007f5d 100644
--- a/intern/cycles/kernel/geom/geom_object.h
+++ b/intern/cycles/kernel/geom/geom_object.h
@@ -352,11 +352,11 @@ ccl_device int shader_pass_id(KernelGlobals *kg, const ShaderData *sd)
/* Particle data from which object was instanced */
-ccl_device_inline float particle_random(KernelGlobals *kg, int particle)
+ccl_device_inline uint particle_index(KernelGlobals *kg, int particle)
{
int offset = particle*PARTICLE_SIZE;
float4 f = kernel_tex_fetch(__particles, offset + 0);
- return f.x;
+ return __float_as_uint(f.x);
}
ccl_device float particle_age(KernelGlobals *kg, int particle)