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:
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/util/util_math_intersect.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/intern/cycles/util/util_math_intersect.h b/intern/cycles/util/util_math_intersect.h
index 5bd3a52dcea..9e0587e1afb 100644
--- a/intern/cycles/util/util_math_intersect.h
+++ b/intern/cycles/util/util_math_intersect.h
@@ -290,49 +290,6 @@ ccl_device_forceinline bool ray_triangle_intersect(
#undef IDX
-ccl_device_inline bool ray_triangle_intersect_uv(
- float3 ray_P, float3 ray_D, float ray_t,
- float3 v0, float3 v1, float3 v2,
- float *isect_u, float *isect_v, float *isect_t)
-{
- /* Calculate intersection. */
- const float3 e1 = v1 - v0;
- const float3 e2 = v2 - v0;
- const float3 s1 = cross(ray_D, e2);
-
- const float divisor = dot(s1, e1);
- if(UNLIKELY(divisor == 0.0f)) {
- return false;
- }
- const float inv_divisor = 1.0f/divisor;
-
- /* Compute first barycentric coordinate. */
- const float3 d = ray_P - v0;
- const float u = dot(d, s1)*inv_divisor;
- if(u < 0.0f) {
- return false;
- }
- /* Compute second barycentric coordinate. */
- const float3 s2 = cross(d, e1);
- const float v = dot(ray_D, s2)*inv_divisor;
- if(v < 0.0f) {
- return false;
- }
- const float b0 = 1.0f - u - v;
- if(b0 < 0.0f) {
- return false;
- }
- /* Compute distance to intersection point. */
- const float t = dot(e2, s2)*inv_divisor;
- if(t < 0.0f || t > ray_t) {
- return false;
- }
- *isect_u = u;
- *isect_v = v;
- *isect_t = t;
- return true;
-}
-
ccl_device bool ray_quad_intersect(float3 ray_P, float3 ray_D,
float ray_mint, float ray_maxt,
float3 quad_P,