Revision: 17454
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17454
Author:   broken
Date:     2008-11-14 07:01:06 +0100 (Fri, 14 Nov 2008)

Log Message:
-----------
Volume rendering:

* Use a slightly better (but still not exact) approximation for the view
vector when pre-shading the light cache. This still doesn't give exactly the
same results as non-light-cache shading, but it's better. Will investigate
getting a better view vector when there's more time - or if anyone has a
simple formula to derive shi->view from shi->co that would be great to 
hear about too :)

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

Modified: branches/sim_physics/source/blender/render/intern/source/volumetric.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/volumetric.c       
2008-11-14 04:07:47 UTC (rev 17453)
+++ branches/sim_physics/source/blender/render/intern/source/volumetric.c       
2008-11-14 06:01:06 UTC (rev 17454)
@@ -984,7 +984,7 @@
                        
                        for (z=0; z < res; z++) {
                                co[2] = bbmin[2] + (voxel[2] * z);
-                       
+                               
                                time= PIL_check_seconds_timer();
                                i++;
                        
@@ -1012,6 +1012,9 @@
                                        obi->volume_precache[2*res_3 + x*res_2 
+ y*res + z] = -1.0f;
                                        continue;
                                }
+                               
+                               VECCOPY(shi.view, co);
+                               Normalize(shi.view);
                                density = vol_get_density(&shi, co);
                                vol_get_scattering(&shi, scatter_col, co, 
stepsize, density);
                        


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to