| 12345678910111213141516171819202122232425 |
- // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
- // All rights reserved.
- // Code licensed under the BSD License.
- // http://www.anki3d.org/LICENSE
- #include <AnKi/Shaders/RtShadows.hlsl>
- #pragma anki technique comp
- StructuredBuffer<U32> g_visibleRenderableIndices : register(t0); // 1st element is the count
- RWStructuredBuffer<DispatchIndirectArgs> g_args : register(u0);
- #define NUMTHREADS 64
- [numthreads(1, 1, 1)] void main()
- {
- const U32 renderableCount = g_visibleRenderableIndices[0];
- DispatchIndirectArgs args;
- args.m_threadGroupCountX = (renderableCount + NUMTHREADS - 1) / NUMTHREADS;
- args.m_threadGroupCountY = 1;
- args.m_threadGroupCountZ = 1;
- g_args[0] = args;
- }
|