Exemplo n.º 1
0
        public JobHandle precomputed(SimplexNoise simplex, NativeArray <Float2> _t_vertex, JobHandle other)
        {
            var numTriangles = _t_vertex.Length;

            if (!initArray)
            {
                init(numTriangles);
                initArray = true;
            }

            var job = new JobPrecomputedNoise()
            {
                simplex  = simplex,
                t_noise0 = t_noise0,
                t_noise1 = t_noise1,
                t_noise2 = t_noise2,
                t_noise3 = t_noise3,
                t_noise4 = t_noise4,
                t_noise5 = t_noise5,
                t_noise6 = t_noise6,
                t_vertex = _t_vertex,
            };

            return(job.Schedule(numTriangles, 64, other));
        }
Exemplo n.º 2
0
        public JobPrecomputedNoise create(SimplexNoise simplex, NativeArray <Float2> _t_vertex)
        {
            var numTriangles = _t_vertex.Length;

            if (!initArray)
            {
                init(numTriangles);
                initArray = true;
            }

            var job = new JobPrecomputedNoise()
            {
                simplex  = simplex,
                t_noise0 = t_noise0,
                t_noise1 = t_noise1,
                t_noise2 = t_noise2,
                t_noise3 = t_noise3,
                t_noise4 = t_noise4,
                t_noise5 = t_noise5,
                t_noise6 = t_noise6,
                t_vertex = _t_vertex,
            };

            return(job);
        }