Skip to content
Snippets Groups Projects
Commit 1c6c08d4 authored by Sascha Willems's avatar Sascha Willems
Browse files

Fixed ray tracing callable shader sample HLSL shaders

parent f00568f4
Branches
No related tags found
No related merge requests found
......@@ -2,13 +2,14 @@
struct CallData
{
vec3 outColor;
float3 outColor;
};
[shader("callable")]
void main(inout CallData data)
{
// Generate a checker board pattern
float2 pos = float2(DispatchRaysIndex() / 8);
data.outColor = float3(mod(pos.x + mod(pos.y, 2.0), 2.0));
float2 pos = float2(DispatchRaysIndex().x / 8, DispatchRaysIndex().y / 8);
float col = (pos.x + (pos.y % 2.0)) % 2.0;
data.outColor = float3(col, col, col);
}
\ No newline at end of file
File added
......@@ -2,7 +2,7 @@
struct CallData
{
vec3 outColor;
float3 outColor;
};
[shader("callable")]
......
File added
......@@ -2,13 +2,14 @@
struct CallData
{
vec3 outColor;
float3 outColor;
};
[shader("callable")]
void main(inout CallData data)
{
// Generate a checker board pattern
float2 pos = float2(DispatchRaysIndex() / 8);
data.outColor = float3(mod(pos.y, 2.0));
float2 pos = float2(DispatchRaysIndex().x / 8, DispatchRaysIndex().y / 8);
float col = pos.y % 2.0;
data.outColor = float3(col, col, col);
}
\ No newline at end of file
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment