Fix T57963: Cycles crash using AO for displacement.

Note this is not supported, there exists no geometry at this point, but
it should not crash at least.
This commit is contained in:
Brecht Van Lommel
2018-12-06 19:50:05 +01:00
parent d24cfa329b
commit cccc40db51
2 changed files with 10 additions and 0 deletions

View File

@@ -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;