Fix [#27748] undeterministic behaviour of volumetric renderer
authorMatt Ebb <matt@mke3.net>
Sat, 25 Jun 2011 00:33:36 +0000 (00:33 +0000)
committerMatt Ebb <matt@mke3.net>
Sat, 25 Jun 2011 00:33:36 +0000 (00:33 +0000)
* Made clearer in the UI that the approximate multiple scattering always enables light cache
* Fixed a potential problem in anisotropic scattering

release/scripts/startup/bl_ui/properties_material.py
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/volumetric.c

index 52d6b5f1376e257e10cfacdbd1b469349868c6fd..31da9598641d93a9e775cea3d9ab751cbd68e4b2 100644 (file)
@@ -883,7 +883,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
             sub = col.column()
             sub.enabled = True
             sub.active = False
-            sub.prop(vol, "use_light_cache")
+            sub.label("Light Cache Enabled")
             col.prop(vol, "cache_resolution")
 
             sub = col.column(align=True)
index 8293143a2a65612e740250632d401cd67e17dd80..faa915b7f6c8c6c67cceb51a7ba402d89b2afba7 100644 (file)
@@ -523,7 +523,6 @@ static void *vol_precache_part(void *data)
                                        continue;
                                }
                                
-                               /* this view coordinate is very wrong! */
                                copy_v3_v3(shi->view, cco);
                                normalize_v3(shi->view);
                                vol_get_scattering(shi, scatter_col, cco);
index c4e741b6c612e0c7cfc8c6d5adb55e6c7f22c87b..359002d05aec694ee0ac0d15b03653b08953f473 100644 (file)
@@ -534,6 +534,7 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar,
        
        if (luminance(lacol) < 0.001f) return;
        
+       normalize_v3(lv);
        p = vol_get_phasefunc(shi, shi->mat->vol.asymmetry, shi->view, lv);
        
        /* physically based scattering with non-physically based RGB gain */