/// <summary>
        /// Dispatches the compute shader and sets the counter value, change per iteration effect parameters right before this call.
        /// </summary>
        public void DrawIteration()
        {
            if (FCompiled && drawCommandList != null && drawRenderDrawContext != null)
            {
                // Apply the effect, TODO: only update parameters here and Apply only once in Draw
                EffectInstance.Apply(drawRenderDrawContext.GraphicsContext);

                // Dispatch compute shader
                if (IsIndirect)
                {
                    drawCommandList.DispatchIndirect(IndirectArgsBuffer, ArgsBufferAlignedByteOffset);
                }
                else
                {
                    drawCommandList.Dispatch(ThreadGroupCounts.X, ThreadGroupCounts.Y, ThreadGroupCounts.Z);
                }
            }
        }