Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/scene/film.cpp
| /* SPDX-License-Identifier: Apache-2.0 | /* SPDX-License-Identifier: Apache-2.0 | ||||
| * Copyright 2011-2022 Blender Foundation */ | * Copyright 2011-2022 Blender Foundation */ | ||||
| #include "scene/film.h" | #include "scene/film.h" | ||||
| #include "device/device.h" | #include "device/device.h" | ||||
| #include "scene/background.h" | #include "scene/background.h" | ||||
| #include "scene/bake.h" | #include "scene/bake.h" | ||||
| #include "scene/camera.h" | #include "scene/camera.h" | ||||
| #include "scene/integrator.h" | #include "scene/integrator.h" | ||||
| #include "scene/light.h" | |||||
| #include "scene/mesh.h" | #include "scene/mesh.h" | ||||
| #include "scene/object.h" | #include "scene/object.h" | ||||
| #include "scene/scene.h" | #include "scene/scene.h" | ||||
| #include "scene/stats.h" | #include "scene/stats.h" | ||||
| #include "scene/tables.h" | #include "scene/tables.h" | ||||
| #include "util/algorithm.h" | #include "util/algorithm.h" | ||||
| #include "util/foreach.h" | #include "util/foreach.h" | ||||
| ▲ Show 20 Lines • Show All 348 Lines • ▼ Show 20 Lines | switch (pass->get_type()) { | ||||
| case PASS_ADAPTIVE_AUX_BUFFER: | case PASS_ADAPTIVE_AUX_BUFFER: | ||||
| kfilm->pass_adaptive_aux_buffer = kfilm->pass_stride; | kfilm->pass_adaptive_aux_buffer = kfilm->pass_stride; | ||||
| break; | break; | ||||
| case PASS_SAMPLE_COUNT: | case PASS_SAMPLE_COUNT: | ||||
| kfilm->pass_sample_count = kfilm->pass_stride; | kfilm->pass_sample_count = kfilm->pass_stride; | ||||
| break; | break; | ||||
| case PASS_AOV_COLOR: | case PASS_AOV_COLOR: | ||||
| case PASS_AOV_LPE: | |||||
| if (!have_aov_color) { | if (!have_aov_color) { | ||||
| kfilm->pass_aov_color = kfilm->pass_stride; | kfilm->pass_aov_color = kfilm->pass_stride; | ||||
| have_aov_color = true; | have_aov_color = true; | ||||
| } | } | ||||
| break; | break; | ||||
| case PASS_AOV_VALUE: | case PASS_AOV_VALUE: | ||||
| if (!have_aov_value) { | if (!have_aov_value) { | ||||
| kfilm->pass_aov_value = kfilm->pass_stride; | kfilm->pass_aov_value = kfilm->pass_stride; | ||||
| Show All 38 Lines | if (pass->get_name() == name) { | ||||
| if (pass->get_type() == PASS_AOV_VALUE) { | if (pass->get_type() == PASS_AOV_VALUE) { | ||||
| is_color = false; | is_color = false; | ||||
| return offset_value; | return offset_value; | ||||
| } | } | ||||
| else if (pass->get_type() == PASS_AOV_COLOR) { | else if (pass->get_type() == PASS_AOV_COLOR) { | ||||
| is_color = true; | is_color = true; | ||||
| return offset_color; | return offset_color; | ||||
| } | } | ||||
| /* PASS_AOV_LPE is not supposed to be accessed via shaders. */ | |||||
| } | } | ||||
| if (pass->get_type() == PASS_AOV_VALUE) { | if (pass->get_type() == PASS_AOV_VALUE) { | ||||
| offset_value += pass->get_info().num_components; | offset_value += pass->get_info().num_components; | ||||
| } | } | ||||
| else if (pass->get_type() == PASS_AOV_COLOR) { | else if (pass->get_type() == PASS_AOV_COLOR || pass->get_type() == PASS_AOV_LPE) { | ||||
| offset_color += pass->get_info().num_components; | offset_color += pass->get_info().num_components; | ||||
| } | } | ||||
| } | } | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| bool Film::update_lightgroups(Scene *scene) | bool Film::update_lightgroups(Scene *scene) | ||||
| ▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines | |||||