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
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-07-29 11:22:43 +0400
committerMatt Ebb <matt@mke3.net>2010-07-29 11:22:43 +0400
commit25762f4945daf2c582f804d46c996f584a56e103 (patch)
tree2275d9276bcb50351dc895e671481eb5bf8a2178 /source
parente33460150b0a0bf63e63db6bceb36114028feea0 (diff)
Fix weird colours in areas of high transmission when camera inside a volume.
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/volumetric.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 4ddbc079e91..a58d96736d5 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -786,8 +786,7 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr)
MatInside *m;
Material *mat_backup;
ObjectInstanceRen *obi_backup;
- float prev_alpha = shr->alpha;
-
+
/* XXX: extend to multiple volumes perhaps later */
mat_backup = shi->mat;
obi_backup = shi->obi;
@@ -797,10 +796,10 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr)
shi->obi = m->obi;
shi->obr = m->obi->obr;
- volume_trace(shi, shr, VOL_SHADE_INSIDE);
- shr->alpha += prev_alpha;
- CLAMP(shr->alpha, 0.f, 1.f);
+ memset(shr, 0, sizeof(ShadeResult));
+ volume_trace(shi, shr, VOL_SHADE_INSIDE);
+
shi->mat = mat_backup;
shi->obi = obi_backup;
shi->obr = obi_backup->obr;