Fixed HLSL shaders (mostly ray tracing related)

Updated HLSL compile script
This commit is contained in:
Sascha Willems 2023-10-13 17:26:51 +02:00
parent cb836dd6d0
commit 66dce3c991
14 changed files with 53 additions and 28 deletions

View file

@ -1,4 +1,4 @@
// Copyright 2021 Sascha Willems
// Copyright 2021-2023 Sascha Willems
struct Payload
{
@ -10,8 +10,13 @@ struct CallData
float3 outColor;
};
struct Attributes
{
float2 bary;
};
[shader("closesthit")]
void main(inout Payload p, in float2 attribs)
void main(inout Payload p, in Attributes attribs)
{
// Execute the callable shader indexed by the current geometry being hit
// For our sample this means that the first callable shader in the SBT is invoked for the first triangle, the second callable shader for the second triangle, etc.