GpuTriangleHit¶
Import: import system.gpu;
This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation. Shader-only declarations can be used only inside @compute, @vertex, @fragment, inferred helpers and ray tracing shader functions; using them elsewhere is a compile error.
GpuTriangleHit¶
Where a ray hit a triangle, received by @closest_hit and @any_hit shaders.
barycentrics¶
The weights of the triangle's second and third corners at the hit point; the first corner's weight is 1 - barycentrics.x - barycentrics.y.