diff options
author | Ton Roosendaal <ton@blender.org> | 2008-01-19 14:17:12 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-01-19 14:17:12 +0300 |
commit | c8841a7f2f0e885335295b3cda34097e117d0edb (patch) | |
tree | d7ffd2daa844967a42cba8944b95da0b318e3e29 /source/blender/imbuf/intern/allocimbuf.c | |
parent | e293eed86555487f1c64f4acbe8720690347452c (diff) |
Added new render pass: "Mist".
This is actually just the alpha value as currently being calculated
by the mist code. It is in many cases not very useful to have this as
alpha in shading result, also for postprocess and composite.
Note: this pass also works with "Mist" not set in World, of course.
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index a5d404740cf..bc750e455a6 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -280,6 +280,7 @@ short imb_addrectfloatImBuf(struct ImBuf * ibuf) size = ibuf->x * ibuf->y; size = size * 4 * sizeof(float); + ibuf->channels= 4; if ( (ibuf->rect_float = MEM_mapallocN(size, "imb_addrectfloatImBuf")) ){ ibuf->mall |= IB_rectfloat; @@ -445,7 +446,7 @@ struct ImBuf *IMB_dupImBuf(struct ImBuf *ibuf1) memcpy(ibuf2->rect, ibuf1->rect, x * y * sizeof(int)); if (flags & IB_rectfloat) - memcpy(ibuf2->rect_float, ibuf1->rect_float, 4 * x * y * sizeof(float)); + memcpy(ibuf2->rect_float, ibuf1->rect_float, ibuf1->channels * x * y * sizeof(float)); if (flags & IB_planes) memcpy(*(ibuf2->planes),*(ibuf1->planes),ibuf1->depth * ibuf1->skipx * y * sizeof(int)); |