RtShadowsSetupSbtBuild.ankiprog 717 B

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