using Unity.Burst; using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; namespace UnityEngine.Rendering.Universal { [BurstCompile] struct ReorderJob : IJobFor where T : struct { [ReadOnly] public NativeArray indices; [ReadOnly] public NativeArray input; [NativeDisableParallelForRestriction] public NativeArray output; public void Execute(int index) { var newIndex = indices[index]; output[newIndex] = input[index]; } } }