Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldClearIndirectArgs.compute

19 lines
647 B
Plaintext
Raw Normal View History

2024-08-26 13:07:20 -07:00
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma kernel KClear
// Indirect arguments have to be in a RWBuffer
// The first three uints are near threadgroups, the last three are far threadgroups
RWBuffer<uint> _IndirectBuffer;
[numthreads(2, 1, 1)]
void KClear(uint dispatchThreadId : SV_DispatchThreadID)
{
_IndirectBuffer[dispatchThreadId * 3 ] = 0; // ThreadGroupCountX
_IndirectBuffer[dispatchThreadId * 3 + 1] = 1; // ThreadGroupCountY
_IndirectBuffer[dispatchThreadId * 3 + 2] = 1; // ThreadGroupCountZ
}