diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-07 07:54:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-07 07:54:17 +0300 |
commit | 606223f6a61fb21606ac6faf10aed963c524a3c7 (patch) | |
tree | 0913a2a0fc085751adf336700784323371e0d4d3 /intern/cycles | |
parent | 0c6d5232a3999770accf0433b436a3bdf5f6f7a8 (diff) | |
parent | d6d76759f8493ca156c597840f9d41a64e326eba (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/svm/svm_ao.h | 5 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_bevel.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_ao.h b/intern/cycles/kernel/svm/svm_ao.h index 0337c88a543..15d074780c4 100644 --- a/intern/cycles/kernel/svm/svm_ao.h +++ b/intern/cycles/kernel/svm/svm_ao.h @@ -33,6 +33,11 @@ ccl_device_noinline float svm_ao(KernelGlobals *kg, return 1.0f; } + /* Can't raytrace from shaders like displacement, before BVH exists. */ + if (kernel_data.bvh.bvh_layout == BVH_LAYOUT_NONE) { + return 1.0f; + } + if(flags & NODE_AO_INSIDE) { N = -N; } diff --git a/intern/cycles/kernel/svm/svm_bevel.h b/intern/cycles/kernel/svm/svm_bevel.h index 79d0fb6ddbe..96d132acd73 100644 --- a/intern/cycles/kernel/svm/svm_bevel.h +++ b/intern/cycles/kernel/svm/svm_bevel.h @@ -34,6 +34,11 @@ ccl_device_noinline float3 svm_bevel( return sd->N; } + /* Can't raytrace from shaders like displacement, before BVH exists. */ + if (kernel_data.bvh.bvh_layout == BVH_LAYOUT_NONE) { + return sd->N; + } + /* Don't bevel for blurry indirect rays. */ if(state->min_ray_pdf < 8.0f) { return sd->N; |