summaryrefslogtreecommitdiffstats
path: root/tests/cuda
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cuda')
-rw-r--r--tests/cuda/lss-test.slang17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/cuda/lss-test.slang b/tests/cuda/lss-test.slang
index f3052cacb..d3f4437de 100644
--- a/tests/cuda/lss-test.slang
+++ b/tests/cuda/lss-test.slang
@@ -10,6 +10,12 @@
//CHECK: optixHitObjectIsSphereHit
//CHECK: optixHitObjectIsLSSHit
+//CHECK_: __global__ void __raygen__raygenShaderLSS()
+//CHECK: optixHitObjectGetSpherePositionAndRadius
+//CHECK: optixHitObjectGetLssPositionsAndRadii
+//CHECK: optixHitObjectIsSphereHit
+//CHECK: optixHitObjectIsLSSHit
+
struct RayPayload
{
float4 color;
@@ -33,4 +39,15 @@ void closestHitShaderLss(inout RayPayload payload, in BuiltInTriangleIntersectio
float2x4 lssData = hitObj.GetLssPositionsAndRadii();
bool isSphereHit = hitObj.IsSphereHit();
bool isLssHit = hitObj.IsLssHit();
+}
+
+[shader("raygen")]
+void raygenShaderLSS(inout RayPayload payload, in BuiltInTriangleIntersectionAttributes attr)
+{
+ // Test HitObject API functions
+ HitObject hitObj;
+ float4 sphereData = hitObj.GetSpherePositionAndRadius();
+ float2x4 lssData = hitObj.GetLssPositionsAndRadii();
+ bool isSphereHit = hitObj.IsSphereHit();
+ bool isLssHit = hitObj.IsLssHit();
} \ No newline at end of file