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 <brecht@blender.org>2022-02-24 21:40:42 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-02-24 21:40:42 +0300
commit9de720f31aaa5081dcdd62eee29e67f865d340fc (patch)
treefea7b16a8f830de116aa9dc67cdf94e1f2df0a27 /intern/cycles/kernel/bvh
parent8fb7c50aabdf79d7c0f72a43c624cbbabbe146a7 (diff)
parent0781c22ceedc6700a073c620723270d32b2f2852 (diff)
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'intern/cycles/kernel/bvh')
-rw-r--r--intern/cycles/kernel/bvh/util.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/intern/cycles/kernel/bvh/util.h b/intern/cycles/kernel/bvh/util.h
index 1fd3a3f2850..71045157372 100644
--- a/intern/cycles/kernel/bvh/util.h
+++ b/intern/cycles/kernel/bvh/util.h
@@ -5,27 +5,6 @@
CCL_NAMESPACE_BEGIN
-/* Ray offset to avoid self intersection.
- *
- * This function should be used to compute a modified ray start position for
- * rays leaving from a surface. This is from "A Fast and Robust Method for Avoiding
- * Self-Intersection" see https://research.nvidia.com/publication/2019-03_A-Fast-and
- */
-ccl_device_inline float3 ray_offset(float3 P, float3 Ng)
-{
- const float int_scale = 256.0f;
- int3 of_i = make_int3((int)(int_scale * Ng.x), (int)(int_scale * Ng.y), (int)(int_scale * Ng.z));
-
- float3 p_i = make_float3(__int_as_float(__float_as_int(P.x) + ((P.x < 0) ? -of_i.x : of_i.x)),
- __int_as_float(__float_as_int(P.y) + ((P.y < 0) ? -of_i.y : of_i.y)),
- __int_as_float(__float_as_int(P.z) + ((P.z < 0) ? -of_i.z : of_i.z)));
- const float origin = 1.0f / 32.0f;
- const float float_scale = 1.0f / 65536.0f;
- return make_float3(fabsf(P.x) < origin ? P.x + float_scale * Ng.x : p_i.x,
- fabsf(P.y) < origin ? P.y + float_scale * Ng.y : p_i.y,
- fabsf(P.z) < origin ? P.z + float_scale * Ng.z : p_i.z);
-}
-
#if defined(__KERNEL_CPU__)
ccl_device int intersections_compare(const void *a, const void *b)
{