Moved shaders to new directory
This commit is contained in:
parent
0b3f8340e3
commit
99b226237a
1244 changed files with 0 additions and 0 deletions
27
shaders/hlsl/raytracingsbtdata/closesthit.rchit
Normal file
27
shaders/hlsl/raytracingsbtdata/closesthit.rchit
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2020 Google LLC
|
||||
|
||||
struct Attribute
|
||||
{
|
||||
float2 attribs;
|
||||
};
|
||||
|
||||
struct Payload
|
||||
{
|
||||
[[vk::location(0)]] float3 hitValue;
|
||||
};
|
||||
|
||||
struct SBT {
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
};
|
||||
[[vk::shader_record_ext]]
|
||||
ConstantBuffer<SBT> sbt;
|
||||
|
||||
[shader("closesthit")]
|
||||
void main(inout Payload p, in float2 attribs)
|
||||
{
|
||||
// Update the hit value to the hit record SBT data associated with this
|
||||
// geometry ID and ray ID
|
||||
p.hitValue = float3(sbt.r, sbt.g, sbt.g);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue