procedural-3d-engine/shaders/slang/raytracingcallable/callable3.slang

14 lines
323 B
Text
Raw Normal View History

/* 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.y % 2.0;
outColor = float3(col, col, col);
}