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 /source/blender/gpu/shaders
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 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl10
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;
}