diff options
author | Julian Eisel <julian@blender.org> | 2020-06-05 14:09:31 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-06-05 14:09:31 +0300 |
commit | 920a58d9b6d667894cf166cbbd25e4c2fbd238ea (patch) | |
tree | 7ca5a9da640753b5e070c439ac3bdd14dfad92cf /intern/cycles/kernel/kernel_types.h | |
parent | c94b6209861ca7cc3985b53474feed7d94c0221a (diff) | |
parent | a1d55bdd530390e58c51abe9707b8d3b0ae3e861 (diff) |
Merge branch 'master' into wm-drag-drop-rewritewm-drag-drop-rewrite
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index b6d319311a1..0a0cf1bd6c0 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -63,11 +63,6 @@ CCL_NAMESPACE_BEGIN #define VOLUME_STACK_SIZE 32 -/* Adaptive sampling constants */ -#define ADAPTIVE_SAMPLE_STEP 4 -static_assert((ADAPTIVE_SAMPLE_STEP & (ADAPTIVE_SAMPLE_STEP - 1)) == 0, - "ADAPTIVE_SAMPLE_STEP must be power of two for bitwise operations to work"); - /* Split kernel constants */ #define WORK_POOL_SIZE_GPU 64 #define WORK_POOL_SIZE_CPU 1 @@ -278,6 +273,7 @@ enum SamplingPattern { /* these flags values correspond to raytypes in osl.cpp, so keep them in sync! */ enum PathRayFlag { + /* Ray visibility. */ PATH_RAY_CAMERA = (1 << 0), PATH_RAY_REFLECT = (1 << 1), PATH_RAY_TRANSMIT = (1 << 2), @@ -286,6 +282,7 @@ enum PathRayFlag { PATH_RAY_SINGULAR = (1 << 5), PATH_RAY_TRANSPARENT = (1 << 6), + /* Shadow ray visibility. */ PATH_RAY_SHADOW_OPAQUE_NON_CATCHER = (1 << 7), PATH_RAY_SHADOW_OPAQUE_CATCHER = (1 << 8), PATH_RAY_SHADOW_OPAQUE = (PATH_RAY_SHADOW_OPAQUE_NON_CATCHER | PATH_RAY_SHADOW_OPAQUE_CATCHER), @@ -297,8 +294,11 @@ enum PathRayFlag { PATH_RAY_SHADOW_TRANSPARENT_NON_CATCHER), PATH_RAY_SHADOW = (PATH_RAY_SHADOW_OPAQUE | PATH_RAY_SHADOW_TRANSPARENT), - PATH_RAY_CURVE = (1 << 11), /* visibility flag to define curve segments */ - PATH_RAY_VOLUME_SCATTER = (1 << 12), /* volume scattering */ + /* Unused, free to reuse. */ + PATH_RAY_UNUSED = (1 << 11), + + /* Ray visibility for volume scattering. */ + PATH_RAY_VOLUME_SCATTER = (1 << 12), /* Special flag to tag unaligned BVH nodes. */ PATH_RAY_NODE_UNALIGNED = (1 << 13), @@ -400,6 +400,10 @@ typedef enum PassType { PASS_VOLUME_INDIRECT, /* No Scatter color since it's tricky to define what it would even mean. */ PASS_CATEGORY_LIGHT_END = 63, + + PASS_BAKE_PRIMITIVE, + PASS_BAKE_DIFFERENTIAL, + PASS_CATEGORY_BAKE_END = 95 } PassType; #define PASS_ANY (~0) @@ -1242,7 +1246,9 @@ typedef struct KernelFilm { int pass_aov_color; int pass_aov_value; - int pad1; + int pass_aov_color_num; + int pass_aov_value_num; + int pad1, pad2, pad3; /* XYZ to rendering color space transform. float4 instead of float3 to * ensure consistent padding/alignment across devices. */ @@ -1251,6 +1257,10 @@ typedef struct KernelFilm { float4 xyz_to_b; float4 rgb_to_y; + int pass_bake_primitive; + int pass_bake_differential; + int pad; + #ifdef __KERNEL_DEBUG__ int pass_bvh_traversed_nodes; int pass_bvh_traversed_instances; @@ -1265,7 +1275,7 @@ typedef struct KernelFilm { int use_display_exposure; int use_display_pass_alpha; - int pad3, pad4, pad5; + int pad4, pad5, pad6; } KernelFilm; static_assert_align(KernelFilm, 16); @@ -1348,6 +1358,8 @@ typedef struct KernelIntegrator { int sampling_pattern; int aa_samples; int adaptive_min_samples; + int adaptive_step; + int adaptive_stop_per_sample; float adaptive_threshold; /* volume render */ @@ -1360,7 +1372,7 @@ typedef struct KernelIntegrator { int max_closures; - int pad1, pad2, pad3; + int pad1; } KernelIntegrator; static_assert_align(KernelIntegrator, 16); @@ -1428,6 +1440,14 @@ typedef struct KernelTables { } KernelTables; static_assert_align(KernelTables, 16); +typedef struct KernelBake { + int object_index; + int tri_offset; + int type; + int pass_filter; +} KernelBake; +static_assert_align(KernelBake, 16); + typedef struct KernelData { KernelCamera cam; KernelFilm film; @@ -1436,6 +1456,7 @@ typedef struct KernelData { KernelBVH bvh; KernelCurves curve; KernelTables tables; + KernelBake bake; } KernelData; static_assert_align(KernelData, 16); @@ -1464,6 +1485,9 @@ typedef struct KernelObject { float cryptomatte_object; float cryptomatte_asset; + + float shadow_terminator_offset; + float pad1, pad2, pad3; } KernelObject; static_assert_align(KernelObject, 16); |