T61971: Compilation Displacement/Background Kernel
Displacement and Background kernels are selectively used, but always compiled. This patch will not compile these kernels when they are not needed. Displacement kernel is only used for true displacement. Background kernel is only used when there is a (Cycles)Light of type `LIGHT_BACKGROUND`. Reviewed By: brecht, #cycles Tags: #cycles Maniphest Tasks: T61971 Differential Revision: https://developer.blender.org/D4412
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "device/device.h"
|
||||
#include "render/graph.h"
|
||||
#include "render/integrator.h"
|
||||
#include "render/light.h"
|
||||
#include "render/mesh.h"
|
||||
#include "render/object.h"
|
||||
#include "render/scene.h"
|
||||
@@ -687,8 +688,11 @@ DeviceRequestedFeatures Session::get_requested_device_features()
|
||||
if(object->is_shadow_catcher) {
|
||||
requested_features.use_shadow_tricks = true;
|
||||
}
|
||||
requested_features.use_true_displacement |= mesh->has_true_displacement();
|
||||
}
|
||||
|
||||
requested_features.use_background_light = scene->light_manager->has_background_light(scene);
|
||||
|
||||
BakeManager *bake_manager = scene->bake_manager;
|
||||
requested_features.use_baking = bake_manager->get_baking();
|
||||
requested_features.use_integrator_branched = (scene->integrator->method == Integrator::BRANCHED_PATH);
|
||||
|
Reference in New Issue
Block a user