diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-31 21:32:18 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-31 21:32:18 +0400 |
commit | ca23999b2cf7344c3cfddf9652c53cad02dc95ab (patch) | |
tree | c94c10fffd09616159346d728bbbc0a8f14d58d5 /source/blender | |
parent | 38a0d48fa75390033c89161518e851b48b4034ec (diff) |
Fix blender internal strand render issue with deep shadow buffers, and AA samples
smaller than the number of shadow sample buffers. There was not enough shadow in
such cases, as some of the sample buffers were not filled in.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/strand.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index 6e2e97b95de..2fe8adaa1ee 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -449,6 +449,7 @@ typedef struct StrandPart { int sample; int shadow; float (*jit)[2]; + int samples; StrandSegment *segment; float t[3], s[3]; @@ -669,12 +670,8 @@ static void strand_render(Render *re, StrandSegment *sseg, float winmat[][4], St float dt= p2->t - p1->t; int a; - if (re->osa) { - for (a=0; a<re->osa; a++) - do_scanconvert_strand(re, spart, zspan, t, dt, p1->zco2, p1->zco1, p2->zco1, p2->zco2, a); - } - else - do_scanconvert_strand(re, spart, zspan, t, dt, p1->zco2, p1->zco1, p2->zco1, p2->zco2, 0); + for (a=0; a<spart->samples; a++) + do_scanconvert_strand(re, spart, zspan, t, dt, p1->zco2, p1->zco1, p2->zco1, p2->zco2, a); } else { float hoco1[4], hoco2[4]; @@ -786,7 +783,7 @@ void render_strand_segment(Render *re, float winmat[][4], StrandPart *spart, ZSp } /* render call to fill in strands */ -int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBase *apsmbase, unsigned int lay, int UNUSED(negzmask), float winmat[][4], int winx, int winy, int UNUSED(sample), float (*jit)[2], float clipcrop, int shadow, StrandShadeCache *cache) +int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBase *apsmbase, unsigned int lay, int UNUSED(negzmask), float winmat[][4], int winx, int winy, int samples, float (*jit)[2], float clipcrop, int shadow, StrandShadeCache *cache) { ObjectRen *obr; ObjectInstanceRen *obi; @@ -820,6 +817,7 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBa spart.cache= cache; spart.shadow= shadow; spart.jit= jit; + spart.samples= samples; zbuf_alloc_span(&zspan, pa->rectx, pa->recty, clipcrop); |