Skip to content

Commit 1970895

Browse files
committed
SYCL fix:
pass procedural UVs directly to prevent data loss from UNORM conversion
1 parent a509d1e commit 1970895

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernels/sycl/rthwif_embree.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,14 @@ SYCL_EXTERNAL __attribute__((always_inline)) void rtcIntersectRTHW(sycl::global_
731731
if (valid)
732732
{
733733
float t = intel_get_hit_distance(query, intel_hit_type_committed_hit);
734-
float2 uv = intel_get_hit_barycentrics (query, intel_hit_type_committed_hit);
734+
float2 uv(ray.u, ray.v);
735735
unsigned int geomID = intel_get_hit_geometry_id(query, intel_hit_type_committed_hit);
736736

737737
unsigned int primID = ray.primID;
738-
if (intel_get_hit_candidate(query, intel_hit_type_committed_hit) == intel_candidate_type_triangle)
738+
if (intel_get_hit_candidate(query, intel_hit_type_committed_hit) == intel_candidate_type_triangle) {
739739
primID = intel_get_hit_triangle_primitive_id(query, intel_hit_type_committed_hit);
740+
uv = intel_get_hit_barycentrics (query, intel_hit_type_committed_hit);
741+
}
740742

741743
rayhit_i->ray.tfar = t;
742744
rayhit_i->hit.geomID = geomID;

0 commit comments

Comments
 (0)