diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-06-13 19:33:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-06-13 19:33:59 +0400 |
commit | 01b036f5c623ff022d09f9209d16d69fbf6df3b7 (patch) | |
tree | bbb29c27927312af471871034b1f458da07afd10 /source/blender | |
parent | 0bed750c3a4f7b368c06d40847356451f51eced6 (diff) |
Fix #31754: strand width fade value 2.0 gives wrong result, should fade out
strand entirely. Fix based on patch by Philipp Oeser.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/strand.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index a48a6b75049..4eebc967823 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -1729,7 +1729,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem strandbuf->minwidth= ma->strand_min; if (ma->strand_widthfade == 0.0f) - strandbuf->widthfade= 0.0f; + strandbuf->widthfade= -1.0f; else if (ma->strand_widthfade >= 1.0f) strandbuf->widthfade= 2.0f - ma->strand_widthfade; else diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index 7e0744096b3..0e7c8a13043 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -400,7 +400,7 @@ void strand_shade_segment(Render *re, StrandShadeCache *cache, StrandSegment *ss interpolate_shade_result(&shr1, &shr2, t, ssamp->shr, addpassflag); /* apply alpha along width */ - if (sseg->buffer->widthfade != 0.0f) { + if (sseg->buffer->widthfade != -1.0f) { s = 1.0f - powf(fabsf(s), sseg->buffer->widthfade); strand_apply_shaderesult_alpha(ssamp->shr, s); |