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,8 +1,8 @@
// Copyright 2020 Google LLC
struct Attribute
struct Attributes
{
float2 attribs;
float2 bary;
};
struct Payload
@ -11,8 +11,8 @@ struct Payload
};
[shader("closesthit")]
void main(inout Payload p, in float2 attribs)
void main(inout Payload p, in Attributes attribs)
{
const float3 barycentricCoords = float3(1.0f - attribs.x - attribs.y, attribs.x, attribs.y);
const float3 barycentricCoords = float3(1.0f - attribs.bary.x - attribs.bary.y, attribs.bary.x, attribs.bary.y);
p.hitValue = barycentricCoords;
}