Changed ray tracing closest hit shader hit attributes to vec2

Fixes #878
This commit is contained in:
Sascha Willems 2021-10-18 21:41:18 +02:00
parent 711743ad69
commit 1993f3af5d
9 changed files with 11 additions and 14 deletions

View file

@ -1,10 +1,5 @@
// Copyright 2021 Sascha Willems
struct Attribute
{
float2 attribs;
};
struct Payload
{
[[vk::location(0)]] float3 hitValue;
@ -16,7 +11,7 @@ struct CallData
};
[shader("closesthit")]
void main(inout Payload p, in float3 attribs)
void main(inout Payload p, in float2 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.