Added shaders for ray tracing callable sample
This commit is contained in:
parent
b102f0bded
commit
381c6eff03
5 changed files with 118 additions and 0 deletions
14
shaders/slang/raytracingcallable/callable1.slang
Normal file
14
shaders/slang/raytracingcallable/callable1.slang
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/* Copyright (c) 2025, Sascha Willems
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
[shader("callable")]
|
||||
void callableMain(inout float3 outColor)
|
||||
{
|
||||
// Generate a checker board pattern
|
||||
float2 pos = float2(DispatchRaysIndex().x / 8, DispatchRaysIndex().y / 8);
|
||||
float col = (pos.x + (pos.y % 2.0)) % 2.0;
|
||||
outColor = float3(col, col, col);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue