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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-11-01 19:09:36 +0300
committerTon Roosendaal <ton@blender.org>2008-11-01 19:09:36 +0300
commit0aff409d54720f2263c1b13f115409185e1f5f91 (patch)
treeeafced474776806b2f3f66c671b1e3b1b264b303 /source/blender/render
parentbd81d96b78bf0b53128d13ac8655a0397405e403 (diff)
Bugfix #17913
Bah... fix for envmaps just before 2.48 release gave good looking envmaps only when there was no sky involved... The alpha in environment maps should be reset to 255... something that was never done before, but also didn't show errors until other fixes in image rendering were done.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/envmap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index d281ac9e5c8..13fa9b17b71 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -439,12 +439,19 @@ static void render_envmap(Render *re, EnvMap *env)
if(re->test_break()==0) {
RenderLayer *rl= envre->result->layers.first;
+ int y;
+ char *alpha;
ibuf= IMB_allocImBuf(envre->rectx, envre->recty, 24, IB_rect, 0);
ibuf->rect_float= rl->rectf;
IMB_rect_from_float(ibuf);
ibuf->rect_float= NULL;
-
+
+ /* envmap renders without alpha */
+ alpha= ((char *)ibuf->rect)+3;
+ for(y= ibuf->x*ibuf->y - 1; y>=0; y--, alpha+=4)
+ *alpha= 255;
+
env->cube[part]= ibuf;
}