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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-10-01 17:34:37 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-10-01 17:34:37 +0300
commit9ad829da7bde6e9996adf3ba817a89a4825da486 (patch)
tree9a04ea707e9a4286b80a5bac341ea38e8d536f5d /intern
parent066df84f730d213c3e6ea875c202aa46cf1a6642 (diff)
Cycles: Correction to point density with particle source and world mapping
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/blender_texture.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_texture.cpp b/intern/cycles/blender/blender_texture.cpp
index cb4dd1792d0..a1e1c82be7b 100644
--- a/intern/cycles/blender/blender_texture.cpp
+++ b/intern/cycles/blender/blender_texture.cpp
@@ -68,10 +68,12 @@ static void density_particle_system_texture_space(
float3 particle_size = make_float3(radius, radius, radius);
for(int i = 0; i < b_particle_system.particles.length(); ++i) {
BL::Particle particle = b_particle_system.particles[i];
- float3 location = get_float3(particle.location());
- location = transform_point(&itfm, location);
- min = ccl::min(min, location - particle_size);
- max = ccl::max(max, location + particle_size);
+ if (particle.alive_state() == BL::Particle::alive_state_ALIVE) {
+ float3 location = get_float3(particle.location());
+ location = transform_point(&itfm, location);
+ min = ccl::min(min, location - particle_size);
+ max = ccl::max(max, location + particle_size);
+ }
}
/* Calculate texture space from the particle bounds. */
loc = (min + max) * 0.5f;