static public JobHandle Schedule(NativeArray <float3> vertices, NativeArray <int> tris, NativeArray <NormalInfo> info, JobHandle dependOn = default) { var job = new CalculateNormalInfoJob { vertices = vertices, triangles = tris, info = info }; return(job.Schedule(tris.Length / 3, BatchCount, dependOn)); }
static public JobHandle Schedule(NativeArray <float3> vertices, NativeArray <int> triangles, NativeArray <float3> normals, JobHandle dependOn = default) { NativeArray <NormalInfo> info = new NativeArray <NormalInfo>(triangles.Length, Allocator.TempJob); dependOn = CalculateNormalInfoJob.Schedule(vertices, triangles, info, dependOn); dependOn = GenerateNormals.Schedule(info, normals, dependOn); dependOn = info.Dispose(dependOn); return(dependOn); }