private void PrecalculateGradient(VolumeDataInfo info) { var t = new AsyncGradientCalculator(info, this); t.Start(); StartCoroutine(ReadGradient(t)); }
private IEnumerator ReadGradient(AsyncGradientCalculator t) { yield return(t.WaitTillDone()); var info = t.GetTexture(); _gradientTex = new Texture3D(info.width, info.height, info.thickness, TextureFormat.RGBAHalf, true); _gradientTex.SetPixels(info.data); _gradientTex.Apply(true, true); finishedGradientCalculating = true; }