Cycles: Added Cryptomatte output.
[blender.git] / intern / cycles / kernel / kernel_globals.h
index 74cfacb5bc1d6fbc37d2ecac1449a3c7757dbdf9..37402f428634d5b68c817ee1a6f13a4fe769da03 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifdef __KERNEL_CPU__
 #  include "util/util_vector.h"
+#  include "util/util_map.h"
 #endif
 
 #ifdef __KERNEL_OPENCL__
@@ -42,6 +43,8 @@ struct OSLThreadData;
 struct OSLShadingSystem;
 #  endif
 
+typedef unordered_map<float, float> CoverageMap;
+
 struct Intersection;
 struct VolumeStep;
 
@@ -68,6 +71,11 @@ typedef struct KernelGlobals {
        VolumeStep *decoupled_volume_steps[2];
        int decoupled_volume_steps_index;
 
+       /* A buffer for storing per-pixel coverage for Cryptomatte. */
+       CoverageMap *coverage_object;
+       CoverageMap *coverage_material;
+       CoverageMap *coverage_asset;
+
        /* split kernel */
        SplitData split_data;
        SplitParams split_param_data;