Moved shaders to new directory
This commit is contained in:
parent
0b3f8340e3
commit
99b226237a
1244 changed files with 0 additions and 0 deletions
21
shaders/hlsl/raytracingcallable/closesthit.rchit
Normal file
21
shaders/hlsl/raytracingcallable/closesthit.rchit
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2021 Sascha Willems
|
||||
|
||||
struct Payload
|
||||
{
|
||||
[[vk::location(0)]] float3 hitValue;
|
||||
};
|
||||
|
||||
struct CallData
|
||||
{
|
||||
float3 outColor;
|
||||
};
|
||||
|
||||
[shader("closesthit")]
|
||||
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.
|
||||
CallData callData;
|
||||
CallShader(GeometryIndex(), callData);
|
||||
p.hitValue = callData.outColor;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue