public void UpdateJobsGerstnerCache(AsyncGPUReadbackRequest request) { NativeArray <ushort> resultData = request.GetData <ushort>(); NativeArray <ushort> data = new NativeArray <ushort>(resultData, Allocator.Temp); ShapeGerstnerJobs.AddNewOceanDepthCache(this, data); data.Dispose(); }
private void LateUpdateGerstnerJobs() { ShapeGerstnerJobs.StartSettingWaveData(); foreach (var gerstner in _gerstnerComponents) { // Run any Gerstner-related jobs if (gerstner._weight > 0.0001f) { gerstner.AddGerstnerData(); } } ShapeGerstnerJobs.FinishAddingWaveData(); ShapeGerstnerJobs.ScheduleJobs(); }
public void AddGerstnerData() { float[] twoPis = new float[_wavelengths.Length]; ShapeGerstnerJobs.AddWaveData(_wavelengths, _amplitudes, _angleDegs, _phases, _spectrum._chopScales, _spectrum._gravityScales, _componentsPerOctave); }
private void OnDisable() { ShapeGerstnerJobs.Cleanup(); }
private void OnEnable() { ShapeGerstnerJobs.Init(); }