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 <brechtvanlommel@gmail.com>2019-03-17 00:05:37 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-24 15:39:47 +0300
commit7a92b8820b9661af39165f048d716559e513ddab (patch)
tree81ec891cb18bb04c72db20cf0cbff711dcdb64d0 /intern/cycles/kernel/kernel_shadow.h
parent5f888e65c3e765d5c176d3f54cf7d20d216441fc (diff)
Cycles: remove hair minimum width support.
This never really worked as it was supposed to. The main goal of this is to turn noise from sampling tiny hairs into multiple layers of transparency that do not need to be sampled stochastically. However the implementation of this worked by randomly discarding hair intersections in BVH traversal, which defeats the purpose. If it ever comes back, it's best implemented outside the kernel as a preprocess that changes hair radius before BVH building. This would also make it work with Embree, where it's not supported now. But it's not so clear anymore that with many AA samples and GPU rendering this feature is as helpful as it once was for CPU raytracers with few AA samples. The benefit of removing this feature is improved hair ray tracing performance, tested on NVIDIA Titan Xp: bmw27: +0.37% classroom: +0.26% fishy_cat: -7.36% koro: -12.98% pabellon: -0.12% Differential Revision: https://developer.blender.org/D4532
Diffstat (limited to 'intern/cycles/kernel/kernel_shadow.h')
-rw-r--r--intern/cycles/kernel/kernel_shadow.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/intern/cycles/kernel/kernel_shadow.h b/intern/cycles/kernel/kernel_shadow.h
index 6af1369feab..07201819030 100644
--- a/intern/cycles/kernel/kernel_shadow.h
+++ b/intern/cycles/kernel/kernel_shadow.h
@@ -103,8 +103,7 @@ ccl_device bool shadow_blocked_opaque(KernelGlobals *kg,
Intersection *isect,
float3 *shadow)
{
- const bool blocked = scene_intersect(
- kg, *ray, visibility & PATH_RAY_SHADOW_OPAQUE, isect, NULL, 0.0f, 0.0f);
+ const bool blocked = scene_intersect(kg, *ray, visibility & PATH_RAY_SHADOW_OPAQUE, isect);
#ifdef __VOLUME__
if (!blocked && state->volume_stack[0].shader != SHADER_NONE) {
/* Apply attenuation from current volume shader. */
@@ -319,8 +318,7 @@ ccl_device bool shadow_blocked_transparent_stepped_loop(KernelGlobals *kg,
if (bounce >= kernel_data.integrator.transparent_max_bounce) {
return true;
}
- if (!scene_intersect(
- kg, *ray, visibility & PATH_RAY_SHADOW_TRANSPARENT, isect, NULL, 0.0f, 0.0f)) {
+ if (!scene_intersect(kg, *ray, visibility & PATH_RAY_SHADOW_TRANSPARENT, isect)) {
break;
}
if (!shader_transparent_shadow(kg, isect)) {
@@ -376,8 +374,7 @@ ccl_device bool shadow_blocked_transparent_stepped(KernelGlobals *kg,
Intersection *isect,
float3 *shadow)
{
- bool blocked = scene_intersect(
- kg, *ray, visibility & PATH_RAY_SHADOW_OPAQUE, isect, NULL, 0.0f, 0.0f);
+ bool blocked = scene_intersect(kg, *ray, visibility & PATH_RAY_SHADOW_OPAQUE, isect);
bool is_transparent_isect = blocked ? shader_transparent_shadow(kg, isect) : false;
return shadow_blocked_transparent_stepped_loop(
kg, sd, shadow_sd, state, visibility, ray, isect, blocked, is_transparent_isect, shadow);
@@ -436,8 +433,7 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg,
* TODO(sergey): Check why using record-all behavior causes slowdown in such
* cases. Could that be caused by a higher spill pressure?
*/
- const bool blocked = scene_intersect(
- kg, *ray, visibility & PATH_RAY_SHADOW_OPAQUE, &isect, NULL, 0.0f, 0.0f);
+ const bool blocked = scene_intersect(kg, *ray, visibility & PATH_RAY_SHADOW_OPAQUE, &isect);
const bool is_transparent_isect = blocked ? shader_transparent_shadow(kg, &isect) : false;
if (!blocked || !is_transparent_isect || max_hits + 1 >= SHADOW_STACK_MAX_HITS) {
return shadow_blocked_transparent_stepped_loop(