Skip to content

Commit

Permalink
Enable backface culling for curves in Embree
Browse files Browse the repository at this point in the history
  • Loading branch information
njroussel committed Aug 25, 2023
1 parent f465729 commit 188b254
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ if (MI_ENABLE_EMBREE)
set(EMBREE_GEOMETRY_POINT OFF CACHE BOOL " " FORCE)
set(EMBREE_GEOMETRY_SUBDIVISION OFF CACHE BOOL " " FORCE)
set(EMBREE_GEOMETRY_CURVE ON CACHE BOOL " " FORCE)
set(EMBREE_BACKFACE_CULLING_CURVES ON CACHE BOOL " " FORCE)
set(EMBREE_GEOMETRY_INSTANCE ON CACHE BOOL " " FORCE)
set(EMBREE_GEOMETRY_USER ON CACHE BOOL " " FORCE)
set(EMBREE_IGNORE_INVALID_RAYS ON CACHE BOOL " " FORCE)
Expand Down
2 changes: 1 addition & 1 deletion ext/embree
9 changes: 4 additions & 5 deletions src/shapes/bsplinecurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,10 @@ points and increasing radii::
'filename': 'curves.txt'
},

.. note:: In CUDA variants, the backfaces of the curves are culled. It is
therefore impossible to intersect the curve with a ray which's origin
is inside of the curve. In addition, prior to the NVIDIA v531.18
drivers for Windows and v530.30.02 drivers for Linux,
`important inconsistencies <https://forums.developer.nvidia.com/t/orthographic-camera-with-b-spline-curves/238650>`_
.. note:: The backfaces of the curves are culled. It is therefore impossible to
intersect the curve with a ray that's origin is inside of the curve.
In addition, prior to the NVIDIA v531.18 drivers for Windows and
v530.30.02 drivers for Linux, `important inconsistencies <https://forums.developer.nvidia.com/t/orthographic-camera-with-b-spline-curves/238650>`_
in the ray intersection code have been identified.
We recommend updating to newer drivers.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/shapes/linearcurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ points and increasing radii::
'to_world': mi.ScalarTransform4f.scale([2, 2, 2]).translate([1, 0, 0]),
'filename': 'curves.txt'
},

.. note:: The backfaces of the curves are culled. It is therefore impossible to
intersect the curve with a ray that's origin is inside of the curve.
*/

template <typename Float, typename Spectrum>
Expand Down

0 comments on commit 188b254

Please sign in to comment.