2022-09-08 12:57:00 -06:00
|
|
|
// Copyright 2020 Google LLC
|
|
|
|
|
|
|
|
|
|
struct Payload
|
|
|
|
|
{
|
|
|
|
|
[[vk::location(0)]] float3 hitValue;
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-26 20:28:08 -06:00
|
|
|
struct SBT {
|
|
|
|
|
float r;
|
|
|
|
|
float g;
|
|
|
|
|
float b;
|
|
|
|
|
};
|
|
|
|
|
[[vk::shader_record_ext]]
|
|
|
|
|
ConstantBuffer<SBT> sbt;
|
|
|
|
|
|
2022-09-08 12:57:00 -06:00
|
|
|
[shader("miss")]
|
|
|
|
|
void main(inout Payload p)
|
|
|
|
|
{
|
2022-09-26 20:28:08 -06:00
|
|
|
// Update the hit value to the hit record SBT data associated with this
|
|
|
|
|
// miss record
|
|
|
|
|
p.hitValue = float3(sbt.r, sbt.g, sbt.g);
|
2022-09-08 12:57:00 -06:00
|
|
|
}
|