* AO bugfix - Constant QMC sampling wasn't getting initialised for bake rendering...
authorMatt Ebb <matt@mke3.net>
Tue, 11 Sep 2007 00:26:15 +0000 (00:26 +0000)
committerMatt Ebb <matt@mke3.net>
Tue, 11 Sep 2007 00:26:15 +0000 (00:26 +0000)
source/blender/render/intern/source/convertblender.c

index 7d95a5e6340c2a6dd54878d43572283d7fc4db6f..cb31c58ab2f4d6e5a15685ba8664396acc5041e5 100644 (file)
@@ -3986,8 +3986,13 @@ void RE_Database_Baking(Render *re, Scene *scene, int type)
        }
        
        init_render_world(re);  /* do first, because of ambient. also requires re->osa set correct */
-       if(re->wrld.mode & WO_AMB_OCC)
-               init_ao_sphere(&re->wrld);
+       if(re->wrld.mode & WO_AMB_OCC) {
+               if (re->wrld.ao_samp_method == WO_AOSAMP_HAMMERSLEY)
+                       init_render_hammersley(re);
+               else if (re->wrld.ao_samp_method == WO_AOSAMP_CONSTANT)
+                       init_ao_sphere(&re->wrld);
+       }
+       
        
        /* still bad... doing all */
        init_render_textures(re);