Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/film.cpp
| Show First 20 Lines • Show All 450 Lines • ▼ Show 20 Lines | if (pass->type == PASS_COMBINED && scene->has_shadow_catcher()) { | ||||
| if (shadow_catcher_matte_pass) { | if (shadow_catcher_matte_pass) { | ||||
| pass = shadow_catcher_matte_pass; | pass = shadow_catcher_matte_pass; | ||||
| } | } | ||||
| } | } | ||||
| return pass; | return pass; | ||||
| } | } | ||||
| void Film::update_passes(Scene *scene) | void Film::update_passes(Scene *scene, bool add_sample_count_pass) | ||||
| { | { | ||||
| const Background *background = scene->background; | const Background *background = scene->background; | ||||
| const BakeManager *bake_manager = scene->bake_manager; | const BakeManager *bake_manager = scene->bake_manager; | ||||
| const ObjectManager *object_manager = scene->object_manager; | const ObjectManager *object_manager = scene->object_manager; | ||||
| Integrator *integrator = scene->integrator; | Integrator *integrator = scene->integrator; | ||||
| if (!is_modified() && !object_manager->need_update() && !integrator->is_modified()) { | if (!is_modified() && !object_manager->need_update() && !integrator->is_modified()) { | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | for (const Pass *pass : passes_immutable) { | ||||
| } | } | ||||
| } | } | ||||
| if (bake_manager->get_baking()) { | if (bake_manager->get_baking()) { | ||||
| add_auto_pass(scene, PASS_BAKE_PRIMITIVE, "BakePrimitive"); | add_auto_pass(scene, PASS_BAKE_PRIMITIVE, "BakePrimitive"); | ||||
| add_auto_pass(scene, PASS_BAKE_DIFFERENTIAL, "BakeDifferential"); | add_auto_pass(scene, PASS_BAKE_DIFFERENTIAL, "BakeDifferential"); | ||||
| } | } | ||||
| if (add_sample_count_pass) { | |||||
| if (!Pass::contains(scene->passes, PASS_SAMPLE_COUNT)) { | |||||
| add_auto_pass(scene, PASS_SAMPLE_COUNT); | |||||
| } | |||||
| } | |||||
| /* Remove duplicates and initialize internal pass info. */ | /* Remove duplicates and initialize internal pass info. */ | ||||
| finalize_passes(scene, use_denoise); | finalize_passes(scene, use_denoise); | ||||
| /* Flush scene updates. */ | /* Flush scene updates. */ | ||||
| const bool have_uv_pass = Pass::contains(scene->passes, PASS_UV); | const bool have_uv_pass = Pass::contains(scene->passes, PASS_UV); | ||||
| const bool have_motion_pass = Pass::contains(scene->passes, PASS_MOTION); | const bool have_motion_pass = Pass::contains(scene->passes, PASS_MOTION); | ||||
| const bool have_ao_pass = Pass::contains(scene->passes, PASS_AO); | const bool have_ao_pass = Pass::contains(scene->passes, PASS_AO); | ||||
| ▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines | |||||