Revision: 22737
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22737
Author:   broken
Date:     2009-08-24 10:13:09 +0200 (Mon, 24 Aug 2009)

Log Message:
-----------
* Fix for camera+internal surface object inside ztransp volume

Modified Paths:
--------------
    branches/volume25/source/blender/render/intern/source/shadeinput.c
    branches/volume25/source/blender/render/intern/source/volumetric.c

Modified: branches/volume25/source/blender/render/intern/source/shadeinput.c
===================================================================
--- branches/volume25/source/blender/render/intern/source/shadeinput.c  
2009-08-24 04:31:13 UTC (rev 22736)
+++ branches/volume25/source/blender/render/intern/source/shadeinput.c  
2009-08-24 08:13:09 UTC (rev 22737)
@@ -169,7 +169,8 @@
        }       
        
        if(R.r.mode & R_RAYTRACE) {
-               shade_volume_inside(shi, shr);
+               if (R.render_volumes_inside.first)
+                       shade_volume_inside(shi, shr);
        }
 }
 

Modified: branches/volume25/source/blender/render/intern/source/volumetric.c
===================================================================
--- branches/volume25/source/blender/render/intern/source/volumetric.c  
2009-08-24 04:31:13 UTC (rev 22736)
+++ branches/volume25/source/blender/render/intern/source/volumetric.c  
2009-08-24 08:13:09 UTC (rev 22737)
@@ -575,15 +575,14 @@
                startco = shi->camera_co;
                endco = shi->co;
                
-               if (!ztransp) {
-                       if (trace_behind) {
+               if (trace_behind) {
+                       if (!ztransp)
                                /* trace behind the volume object */
                                vol_trace_behind(shi, shi->vlr, endco, col);
-                       } else {
-                               /* we're tracing through the volume between the 
camera 
-                                * and a solid surface, so use that pre-shaded 
radiance */
-                               QUATCOPY(col, shr->combined);
-                       }
+               } else {
+                       /* we're tracing through the volume between the camera 
+                        * and a solid surface, so use that pre-shaded radiance 
*/
+                       QUATCOPY(col, shr->combined);
                }
                
                /* shade volume from 'camera' to 1st hit point */
@@ -676,8 +675,9 @@
        MatInside *m;
        Material *mat_backup;
        
-       if (BLI_countlist(&R.render_volumes_inside) == 0) return;
+       //if (BLI_countlist(&R.render_volumes_inside) == 0) return;
        
+       /* XXX: extend to multiple volumes perhaps later */
        mat_backup = shi->mat;
        m = R.render_volumes_inside.first;
        shi->mat = m->ma;


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to