Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render/film.h')
-rw-r--r--intern/cycles/render/film.h55
1 files changed, 21 insertions, 34 deletions
diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 462a7275491..5d327353361 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -17,6 +17,7 @@
#ifndef __FILM_H__
#define __FILM_H__
+#include "render/pass.h"
#include "util/util_string.h"
#include "util/util_vector.h"
@@ -38,36 +39,15 @@ typedef enum FilterType {
FILTER_NUM_TYPES,
} FilterType;
-class Pass : public Node {
- public:
- NODE_DECLARE
-
- Pass();
-
- PassType type;
- int components;
- bool filter;
- bool exposure;
- PassType divide_type;
- ustring name;
-
- static void add(PassType type, vector<Pass> &passes, const char *name = NULL);
- static bool equals(const vector<Pass> &A, const vector<Pass> &B);
- static bool contains(const vector<Pass> &passes, PassType);
-};
-
class Film : public Node {
public:
NODE_DECLARE
NODE_SOCKET_API(float, exposure)
- NODE_SOCKET_API(bool, denoising_data_pass)
- NODE_SOCKET_API(bool, denoising_clean_pass)
- NODE_SOCKET_API(bool, denoising_prefiltered_pass)
- NODE_SOCKET_API(int, denoising_flags)
NODE_SOCKET_API(float, pass_alpha_threshold)
NODE_SOCKET_API(PassType, display_pass)
+ NODE_SOCKET_API(bool, show_active_pixels)
NODE_SOCKET_API(FilterType, filter_type)
NODE_SOCKET_API(float, filter_width)
@@ -76,17 +56,18 @@ class Film : public Node {
NODE_SOCKET_API(float, mist_depth)
NODE_SOCKET_API(float, mist_falloff)
- NODE_SOCKET_API(bool, use_light_visibility)
NODE_SOCKET_API(CryptomatteType, cryptomatte_passes)
NODE_SOCKET_API(int, cryptomatte_depth)
- NODE_SOCKET_API(bool, use_adaptive_sampling)
+ /* Approximate shadow catcher pass into its matte pass, so that both artificial objects and
+ * shadows can be alpha-overed onto a backdrop. */
+ NODE_SOCKET_API(bool, use_approximate_shadow_catcher)
private:
- int pass_stride;
- int denoising_data_offset;
- int denoising_clean_offset;
- size_t filter_table_offset;
+ size_t filter_table_offset_;
+ bool prev_have_uv_pass = false;
+ bool prev_have_motion_pass = false;
+ bool prev_have_ao_pass = false;
public:
Film();
@@ -98,14 +79,20 @@ class Film : public Node {
void device_update(Device *device, DeviceScene *dscene, Scene *scene);
void device_free(Device *device, DeviceScene *dscene, Scene *scene);
- void tag_passes_update(Scene *scene, const vector<Pass> &passes_, bool update_passes = true);
-
int get_aov_offset(Scene *scene, string name, bool &is_color);
- int get_pass_stride() const;
- int get_denoising_data_offset() const;
- int get_denoising_clean_offset() const;
- size_t get_filter_table_offset() const;
+ /* Update passes so that they contain all passes required for the configured functionality.
+ *
+ * If `add_sample_count_pass` is true then the SAMPLE_COUNT pass is ensured to be added. */
+ void update_passes(Scene *scene, bool add_sample_count_pass);
+
+ uint get_kernel_features(const Scene *scene) const;
+
+ private:
+ void add_auto_pass(Scene *scene, PassType type, const char *name = nullptr);
+ void add_auto_pass(Scene *scene, PassType type, PassMode mode, const char *name = nullptr);
+ void remove_auto_passes(Scene *scene);
+ void finalize_passes(Scene *scene, const bool use_denoise);
};
CCL_NAMESPACE_END