diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-06-20 23:21:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-06-22 00:31:44 +0400 |
commit | 8fbd71e5f2862e6efd0e3bcb015f1f6201ccca14 (patch) | |
tree | 0d889efc32554d0eb4ad6f8b1f46b4885b19991d /intern/cycles/kernel/svm | |
parent | 88d8358f91e1306a67d59250162443194ee9edcf (diff) |
Cycles: improved Beckmann sampling using precomputed data
It turns out that the new Beckmann sampling function doesn't work well with
Quasi Monte Carlo sampling, mainly near normal incidence where it can be worse
than the previous sampler. In the new sampler the random number pattern gets
split in two, warped and overlapped, which hurts the stratification, see the
visualization in the differential revision.
Now we use a precomputed table, which is much better behaved. GGX does not seem
to benefit from using a precomputed table.
Disadvantage is that this table adds 1MB of memory usage and 0.03s startup time
to every render (on my quad core CPU).
Differential Revision: https://developer.blender.org/D614
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r-- | intern/cycles/kernel/svm/svm_blackbody.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_blackbody.h b/intern/cycles/kernel/svm/svm_blackbody.h index 63dbf27d35e..15257aed92e 100644 --- a/intern/cycles/kernel/svm/svm_blackbody.h +++ b/intern/cycles/kernel/svm/svm_blackbody.h @@ -55,7 +55,7 @@ ccl_device void svm_node_blackbody(KernelGlobals *kg, ShaderData *sd, float *sta just one (the OSL-lerp is also automatically done for us by "lookup_table_read") */ float t = powf((temperature - BB_DRAPPER) * (1.0f / BB_TABLE_SPACING), (1.0f / BB_TABLE_XPOWER)); - int blackbody_table_offset = kernel_data.blackbody.table_offset; + int blackbody_table_offset = kernel_data.tables.blackbody_offset; /* Retrieve colors from the lookup table */ float lutval = t*lookuptablenormalize; |