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/shaders | |
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/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 5fe14e76a90..1f5ffbdcc7e 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -189,16 +189,18 @@ void geom( } void particle_info( - vec4 sprops, vec3 loc, vec3 vel, vec3 avel, - out float random, out float age, out float life_time, out vec3 location, + vec4 sprops, vec4 loc, vec3 vel, vec3 avel, + out float index, out float random, out float age, + out float life_time, out vec3 location, out float size, out vec3 velocity, out vec3 angular_velocity) { - random = sprops.x; + index = sprops.x; + random = loc.w; age = sprops.y; life_time = sprops.z; size = sprops.w; - location = loc; + location = loc.xyz; velocity = vel; angular_velocity = avel; } |