diff options
author | Matt Ebb <matt@mke3.net> | 2010-07-29 11:22:43 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-07-29 11:22:43 +0400 |
commit | 25762f4945daf2c582f804d46c996f584a56e103 (patch) | |
tree | 2275d9276bcb50351dc895e671481eb5bf8a2178 /source/blender/render | |
parent | e33460150b0a0bf63e63db6bceb36114028feea0 (diff) |
Fix weird colours in areas of high transmission when camera inside a volume.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/volumetric.c | 9 |
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; |