diff options
author | Matt Ebb <matt@mke3.net> | 2010-07-22 16:30:17 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-07-22 16:30:17 +0400 |
commit | da04afe78eac85b837da85b2bb6a26c08face44d (patch) | |
tree | fff44ec7882a66d0fbed755fde1c876101aa8394 /source/blender/render | |
parent | f5d7fc6da5faddbf6a15d924c36d077fe6eb13e2 (diff) |
Fix [#22946] Camera inside volume gives bad results
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/shadeinput.c | 13 | ||||
-rw-r--r-- | source/blender/render/intern/source/volumetric.c | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index 5938e2ce2e0..2f0f5c72070 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -142,11 +142,6 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr) if((shi->layflag & SCE_LAY_SKY) && (R.r.alphamode==R_ADDSKY)) shr->alpha= 1.0f; } - - if(R.r.mode & R_RAYTRACE) { - if (R.render_volumes_inside.first) - shade_volume_inside(shi, shr); - } } @@ -168,8 +163,12 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr) shade_input_init_material(shi); if (shi->mat->material_type == MA_TYPE_VOLUME) { - if(R.r.mode & R_RAYTRACE) - shade_volume_outside(shi, shr); + if(R.r.mode & R_RAYTRACE) { + if (R.render_volumes_inside.first) + shade_volume_inside(shi, shr); + else + shade_volume_outside(shi, shr); + } } else { /* MA_TYPE_SURFACE, MA_TYPE_WIRE */ shade_material_loop(shi, shr); } diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index af456185daf..21a0ab1d2a8 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -785,8 +785,6 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr) ObjectInstanceRen *obi_backup; float prev_alpha = shr->alpha; - //if (BLI_countlist(&R.render_volumes_inside) == 0) return; - /* XXX: extend to multiple volumes perhaps later */ mat_backup = shi->mat; obi_backup = shi->obi; |