From 5e1bbde01d0a77c7b032197cff860305462a9cb2 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Fri, 8 Jun 2012 16:17:57 +0000 Subject: Particle Info node for Cycles. This can be used to access particle information in material shaders for dupli objects. For now only the particle Age and individual Lifetime (in frames) are supported, more attributes can be added when needed. The particle data is stored in a separate texture if any of the dupli objects uses particle info nodes in shaders. To map dupli objects onto particles the store an additional particle_index value, which is different from the simple dupli object index (only visible particles, also works for particle dupli groups mode). Some simple use cases on the code.blender.org blog: http://code.blender.org/index.php/2012/05/particle-info-node/ --- intern/cycles/kernel/kernel_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern/cycles/kernel/kernel_types.h') diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 4fd57a5f2b3..77a800b0e67 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -33,6 +33,7 @@ CCL_NAMESPACE_BEGIN #define LIGHT_SIZE 4 #define FILTER_TABLE_SIZE 256 #define RAMP_TABLE_SIZE 256 +#define PARTICLE_SIZE 1 #define TIME_INVALID FLT_MAX /* device capabilities */ @@ -359,6 +360,7 @@ typedef enum AttributeStandard { ATTR_STD_POSITION_UNDISPLACED, ATTR_STD_MOTION_PRE, ATTR_STD_MOTION_POST, + ATTR_STD_PARTICLE, ATTR_STD_NUM, ATTR_STD_NOT_FOUND = ~0 -- cgit v1.2.3