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_textures.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_textures.h')
-rw-r--r-- | intern/cycles/kernel/kernel_textures.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_textures.h b/intern/cycles/kernel/kernel_textures.h index 482f886df3e..c1b8eed3dff 100644 --- a/intern/cycles/kernel/kernel_textures.h +++ b/intern/cycles/kernel/kernel_textures.h @@ -52,6 +52,9 @@ KERNEL_TEX(float4, texture_float4, __light_data) KERNEL_TEX(float2, texture_float2, __light_background_marginal_cdf) KERNEL_TEX(float2, texture_float2, __light_background_conditional_cdf) +/* particles */ +KERNEL_TEX(float4, texture_float4, __particles) + /* shaders */ KERNEL_TEX(uint4, texture_uint4, __svm_nodes) KERNEL_TEX(uint, texture_uint, __shader_flag) |