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-10-14 15:42:53 +0400
committerTon Roosendaal <ton@blender.org>2008-10-14 15:42:53 +0400
commitb0b37252da6ced3a213db5e603ba843d07619126 (patch)
tree446b76ccb797e98949113bc1f362a13d592b4d95
parent028a10769bb9c66095ee02cd95969e4b45fa7c7a (diff)
Bugfix on IRC report. Luckily Daniel Salazar *does* carefully check our
regression files, it showed small dark outline errors on envmap. This commit rewinds bugfix #8437, which actually had to be fixed on another location in code, which was done a few weeks ago. :)
-rw-r--r--source/blender/render/intern/source/envmap.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index aa4e40739da..d281ac9e5c8 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -640,7 +640,7 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
/* texvec should be the already reflected normal */
EnvMap *env;
ImBuf *ibuf;
- float fac, vec[3], sco[3], dxts[3], dyts[3], w[3];
+ float fac, vec[3], sco[3], dxts[3], dyts[3];
int face, face1;
env= tex->env;
@@ -722,15 +722,9 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
if(fac!=0.0) {
fac= 1.0/fac;
- /* weight contributions based on alpha */
- w[0]= texres->ta*fac;
- w[1]= texr1.ta*fac;
- w[2]= texr2.ta*fac;
-
- /* interpolate premultiplied result (imagewraposa returns key) */
- texres->tr= (w[0]*texres->ta*texres->tr + w[1]*texr1.ta*texr1.tr + w[2]*texr2.ta*texr2.tr);
- texres->tg= (w[0]*texres->ta*texres->tg + w[1]*texr1.ta*texr1.tg + w[2]*texr2.ta*texr2.tg);
- texres->tb= (w[0]*texres->ta*texres->tb + w[1]*texr1.ta*texr1.tb + w[2]*texr2.ta*texr2.tb);
+ texres->tr= fac*(texres->ta*texres->tr + texr1.ta*texr1.tr + texr2.ta*texr2.tr );
+ texres->tg= fac*(texres->ta*texres->tg + texr1.ta*texr1.tg + texr2.ta*texr2.tg );
+ texres->tb= fac*(texres->ta*texres->tb + texr1.ta*texr1.tb + texr2.ta*texr2.tb );
}
texres->ta= 1.0;
}