diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-01 01:00:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-01 03:21:29 +0300 |
commit | 7f86afec9d6799e22127c53d9d0805a87462fc08 (patch) | |
tree | 566aca7a18e47b45251b10fcb5b4393c0d3562a8 /intern/cycles/kernel/kernel_types.h | |
parent | 03d10703783a0d233517aac558ac3f0a7d55d302 (diff) |
Cycles: don't count volume boundaries as transparent bounces.
This is more important now that we will have tigther volume bounds that
we hit multiple times. It also avoids some noise due to RR previously
affecting these surfaces, which shouldn't have been the case and should
eventually be fixed for transparent BSDFs as well.
For non-volume scenes I found no performance impact on NVIDIA or AMD.
For volume scenes the noise decrease and fixed artifacts are worth the
little extra render time, when there is any.
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index d967edca75d..2a437cdbdc6 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -49,6 +49,8 @@ CCL_NAMESPACE_BEGIN #define BSSRDF_MAX_BOUNCES 256 #define LOCAL_MAX_HITS 4 +#define VOLUME_BOUNDS_MAX 1024 + #define BECKMANN_TABLE_SIZE 256 #define SHADER_NONE (~0) @@ -1107,6 +1109,7 @@ typedef struct PathState { /* volume rendering */ #ifdef __VOLUME__ int volume_bounce; + int volume_bounds_bounce; uint rng_congruential; VolumeStack volume_stack[VOLUME_STACK_SIZE]; #endif @@ -1497,8 +1500,10 @@ enum RayState { RAY_ACTIVE, /* Denotes ray has completed processing all samples and is inactive. */ RAY_INACTIVE, - /* Denoted ray has exited path-iteration and needs to update output buffer. */ + /* Denotes ray has exited path-iteration and needs to update output buffer. */ RAY_UPDATE_BUFFER, + /* Denotes ray needs to skip most surface shader work. */ + RAY_HAS_ONLY_VOLUME, /* Donotes ray has hit background */ RAY_HIT_BACKGROUND, /* Denotes ray has to be regenerated */ |