workaround for incorrect ray intersections with open cones#140
Conversation
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v16.0.6
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 740ac5a..9801725 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101,2 +101,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
-
+ const float t_cand = fminf(roots) ;
+
@@ -104 +104 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- float3 n = normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z)*tth2));
+ float3 n = normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z) * tth2));
@@ -111,2 +110,0 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
-
-
Have any feedback or feature suggestions? Share it here.
d561f7b to
628d53b
Compare
628d53b to
b26739f
Compare
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 740ac5a..9801725 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101,2 +101,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
-
+ const float t_cand = fminf(roots) ;
+
@@ -104 +104 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- float3 n = normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z)*tth2));
+ float3 n = normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z) * tth2));
@@ -111,2 +110,0 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
-
-
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 2967d49..3bc042d 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101 +101 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
+ const float t_cand = fminf(roots);
@@ -111,2 +110,0 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
-
-
Have any feedback or feature suggestions? Share it here.
77c33d5 to
5cb7458
Compare
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 2967d49..3bc042d 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101 +101 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
+ const float t_cand = fminf(roots);
@@ -111,2 +110,0 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
-
-
Have any feedback or feature suggestions? Share it here.
5cb7458 to
94857f9
Compare
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 2967d49..3bc042d 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101 +101 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
+ const float t_cand = fminf(roots);
@@ -111,2 +110,0 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
-
-
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Pull request overview
This pull request attempts to fix incorrect ray intersections with open cones by simplifying the intersection logic. However, the implementation introduces several critical bugs that will cause incorrect rendering behavior.
Key changes:
- Removed validation logic that checks if
t_candrepresents a valid intersection - Eliminated cap-specific normal calculations (normals for end cap intersections)
- Simplified to always compute cone surface normals regardless of intersection type
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ggalgoczi Are you going to run this workaround by Simon? |
|
Will ask him about it later on, after finished with the photon leakage. However this is a special case of a cone in question here. I think for now we should not merge since it opens up even closed cones. |
94857f9 to
1ec9ad7
Compare
Cpp-Linter Report
|
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 371c713..a4e7aa3 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101,2 +101,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
-
+ const float t_cand = fminf(roots) ;
+
@@ -107 +107,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- float3 n = normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z)*tth2));
+ float3 n =
+ normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z) * tth2));
Have any feedback or feature suggestions? Share it here.
1ec9ad7 to
d571830
Compare
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v20.1.2
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 371c713..a4e7aa3 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101,2 +101,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
-
+ const float t_cand = fminf(roots) ;
+
@@ -107 +107,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- float3 n = normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z)*tth2));
+ float3 n =
+ normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z) * tth2));
Have any feedback or feature suggestions? Share it here.
|
I think we used this trick to run performance tests on the pfRICH geometry. If the issue with open cones is still relevant, we need to come up with a more robust solution. |
No description provided.