Ejemplo n.º 1
0
            static public JobHandle Schedule(NativeArray <NormalInfo> normalInfo, NativeArray <float3> normals, JobHandle dependOn = default)
            {
                var job = new GenerateNormals {
                    normalInfo = normalInfo, normals = normals
                };

                return(job.Schedule(dependOn));
            }
Ejemplo n.º 2
0
        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);
        }