Closed kyamant closed 2 years ago
Only just seen this. Had a look at the code, and to me it looks correct (it's the miss program that has the intended effect).
Now if I understand your criticism correctly it's that I wouldn't have needed the ray type and (empty) CH/AH programs, and could instead have just "abused" the radiance ray with the appropriate flags. This is indeed true, but whether that is more or less clean of a solution is probably in the eye of the beholder.
That said, a way that would have been cleaner would have been to not use that tick with the miss program at all, and instead use the AH program with optixTerminateRay to set visibitly flag to 0. If you want to submit a PR to that effect, I'd be happy to merge it in.
Since the content of
__closesthit__shadow()`` __anyhit__shadow()
is removed, theSHADOW_RAY_TYPE
forSBT offset
usage is meaningless, since those 2 shaders were associated withSHADOW_RAY_TYPE
. Even though the (secondary)optixTrace()
call in__closesthit__radiance()
usesSHADOW_RAY_TYPE
forSBT offset
, it does not have any effect.This is supposed to be a tutorial (for people trying to learn) and this neglect made it confusing.
Not updating the Sig 19 OptiX 7 -Tutorial.pdf according to the changes is not helpful either.