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/bvh/bvh.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/bvh/bvh.h')
-rw-r--r--intern/cycles/kernel/bvh/bvh.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index 13e72ed299f..7503bad37b0 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -57,7 +57,7 @@ CCL_NAMESPACE_BEGIN
#if defined(__HAIR__)
# define BVH_FUNCTION_NAME bvh_intersect_hair
-# define BVH_FUNCTION_FEATURES BVH_INSTANCING | BVH_HAIR | BVH_HAIR_MINIMUM_WIDTH
+# define BVH_FUNCTION_FEATURES BVH_INSTANCING | BVH_HAIR
# include "kernel/bvh/bvh_traversal.h"
#endif
@@ -69,7 +69,7 @@ CCL_NAMESPACE_BEGIN
#if defined(__HAIR__) && defined(__OBJECT_MOTION__)
# define BVH_FUNCTION_NAME bvh_intersect_hair_motion
-# define BVH_FUNCTION_FEATURES BVH_INSTANCING | BVH_HAIR | BVH_HAIR_MINIMUM_WIDTH | BVH_MOTION
+# define BVH_FUNCTION_FEATURES BVH_INSTANCING | BVH_HAIR | BVH_MOTION
# include "kernel/bvh/bvh_traversal.h"
#endif
@@ -181,10 +181,7 @@ ccl_device_inline bool scene_intersect_valid(const Ray *ray)
ccl_device_intersect bool scene_intersect(KernelGlobals *kg,
const Ray ray,
const uint visibility,
- Intersection *isect,
- uint *lcg_state,
- float difl,
- float extmax)
+ Intersection *isect)
{
PROFILING_INIT(kg, PROFILING_INTERSECT);
@@ -211,7 +208,7 @@ ccl_device_intersect bool scene_intersect(KernelGlobals *kg,
if (kernel_data.bvh.have_motion) {
# ifdef __HAIR__
if (kernel_data.bvh.have_curves)
- return bvh_intersect_hair_motion(kg, &ray, isect, visibility, lcg_state, difl, extmax);
+ return bvh_intersect_hair_motion(kg, &ray, isect, visibility);
# endif /* __HAIR__ */
return bvh_intersect_motion(kg, &ray, isect, visibility);
@@ -220,7 +217,7 @@ ccl_device_intersect bool scene_intersect(KernelGlobals *kg,
#ifdef __HAIR__
if (kernel_data.bvh.have_curves)
- return bvh_intersect_hair(kg, &ray, isect, visibility, lcg_state, difl, extmax);
+ return bvh_intersect_hair(kg, &ray, isect, visibility);
#endif /* __HAIR__ */
#ifdef __KERNEL_CPU__