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:
authorBrecht Van Lommel <brecht@blender.org>2022-08-26 14:14:57 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-01 15:57:39 +0300
commit60119daef569f647c3004360daf657739461b750 (patch)
tree6553b5a16777fdc32afa3fe07dd7d017bc6d1c80 /intern/cycles/kernel/types.h
parent50df9caef01a4225db216d9c4c0515134f7a37bf (diff)
Cycles: remove old Sobol pattern, simplify sampling dimensions
The multi-dimensional Sobol pattern required us to carefully use as low dimensions as possible, as quality goes down in higher dimensions. Now that we have two sampling patterns that are at least as good, there is no need to keep it around and the implementation can be simplified. Differential Revision: https://developer.blender.org/D15788
Diffstat (limited to 'intern/cycles/kernel/types.h')
-rw-r--r--intern/cycles/kernel/types.h64
1 files changed, 37 insertions, 27 deletions
diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h
index 655c9c5503b..16c37beeb5a 100644
--- a/intern/cycles/kernel/types.h
+++ b/intern/cycles/kernel/types.h
@@ -54,7 +54,6 @@ CCL_NAMESPACE_BEGIN
#endif
/* Kernel features */
-#define __SOBOL__
#define __DPDU__
#define __BACKGROUND__
#define __CAUSTICS_TRICKS__
@@ -147,38 +146,49 @@ CCL_NAMESPACE_BEGIN
# define __BVH_LOCAL__
#endif
-/* Path Tracing
- * note we need to keep the u/v pairs at even values */
+/* Sampling Patterns */
+/* Unique numbers for sampling patterns in each bounce. */
enum PathTraceDimension {
- PRNG_FILTER_U = 0,
- PRNG_FILTER_V = 1,
- PRNG_LENS_U = 2,
- PRNG_LENS_V = 3,
- PRNG_TIME = 4,
- PRNG_UNUSED_0 = 5,
- PRNG_UNUSED_1 = 6, /* for some reason (6, 7) is a bad sobol pattern */
- PRNG_UNUSED_2 = 7, /* with a low number of samples (< 64) */
- PRNG_BASE_NUM = 10,
-
- PRNG_BSDF_U = 0,
- PRNG_BSDF_V = 1,
- PRNG_LIGHT_U = 2,
- PRNG_LIGHT_V = 3,
- PRNG_LIGHT_TERMINATE = 4,
- PRNG_TERMINATE = 5,
- PRNG_PHASE_CHANNEL = 6,
- PRNG_SCATTER_DISTANCE = 7,
- PRNG_BOUNCE_NUM = 8,
-
- PRNG_BEVEL_U = 6, /* reuse volume dimension, correlation won't harm */
- PRNG_BEVEL_V = 7,
+ /* Init bounce */
+ PRNG_FILTER = 0,
+ PRNG_LENS = 1,
+ PRNG_TIME = 2,
+
+ /* Shade bounce */
+ PRNG_TERMINATE = 0,
+ PRNG_LIGHT = 1,
+ PRNG_LIGHT_TERMINATE = 2,
+ /* Surface */
+ PRNG_SURFACE_BSDF = 3,
+ PRNG_SURFACE_AO = 4,
+ PRNG_SURFACE_BEVEL = 5,
+ /* Volume */
+ PRNG_VOLUME_PHASE = 3,
+ PRNG_VOLUME_PHASE_CHANNEL = 4,
+ PRNG_VOLUME_SCATTER_DISTANCE = 5,
+ PRNG_VOLUME_OFFSET = 6,
+ PRNG_VOLUME_SHADE_OFFSET = 7,
+
+ /* Subsurface random walk bounces */
+ PRNG_SUBSURFACE_BSDF = 0,
+ PRNG_SUBSURFACE_PHASE_CHANNEL = 1,
+ PRNG_SUBSURFACE_SCATTER_DISTANCE = 2,
+ PRNG_SUBSURFACE_GUIDE_STRATEGY = 3,
+ PRNG_SUBSURFACE_GUIDE_DIRECTION = 4,
+
+ /* Subsurface disk bounce */
+ PRNG_SUBSURFACE_DISK = 0,
+ PRNG_SUBSURFACE_DISK_RESAMPLE = 1,
+
+ /* High enough number so we don't need to change it when adding new dimenions,
+ * low enough so there is no uint16_t overflow with many bounces. */
+ PRNG_BOUNCE_NUM = 16,
};
enum SamplingPattern {
- SAMPLING_PATTERN_SOBOL = 0,
+ SAMPLING_PATTERN_SOBOL_BURLEY = 0,
SAMPLING_PATTERN_PMJ = 1,
- SAMPLING_PATTERN_SOBOL_BURLEY = 2,
SAMPLING_NUM_PATTERNS,
};