diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-08 20:17:57 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-08 20:17:57 +0400 |
commit | 5e1bbde01d0a77c7b032197cff860305462a9cb2 (patch) | |
tree | f751a45ac32c7d210b5e54b5d0a9efab61e16d24 /intern/cycles/kernel/kernel_types.h | |
parent | 82d3d9f2ba47bbf2f868b5a970d1fe149eba13e2 (diff) |
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/
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |