Cycles: Fix missing volumes support for feature-adaptive viewport render
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 May 2016 10:36:31 +0000 (12:36 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 23 May 2016 10:36:31 +0000 (12:36 +0200)
intern/cycles/render/session.cpp

index 630373118892074fc64f643e8ca96a7afe13827c..76979e9ba3e63bed3366f257c104eb0124bcc398 100644 (file)
@@ -610,17 +610,17 @@ DeviceRequestedFeatures Session::get_requested_device_features()
        /* TODO(sergey): Consider moving this to the Scene level. */
        DeviceRequestedFeatures requested_features;
        requested_features.experimental = params.experimental;
+
+       requested_features.max_closure = get_max_closure_count();
+       scene->shader_manager->get_requested_features(
+               scene,
+               &requested_features);
        if(!params.background) {
+               /* Avoid too much re-compilations for viewport render. */
                requested_features.max_closure = 64;
                requested_features.max_nodes_group = NODE_GROUP_LEVEL_MAX;
                requested_features.nodes_features = NODE_FEATURE_ALL;
        }
-       else {
-               requested_features.max_closure = get_max_closure_count();
-               scene->shader_manager->get_requested_features(
-                       scene,
-                       &requested_features);
-       }
 
        /* This features are not being tweaked as often as shaders,
         * so could be done selective magic for the viewport as well.