private void Diffraction() { positions = solutionManager.GetPositions(); a = solutionManager.GetCellRight() * solutionManager.GetK(); c = solutionManager.GetCellForward() * solutionManager.GetK(); Shader.SetGlobalVectorArray(AtomsPoss, positions); Shader.SetGlobalInt(NAToms, solutionManager.GetAtoms().Count); Shader.SetGlobalFloat(_Zoom, zoom); Shader.SetGlobalInt(_K, solutionManager.GetK()); Shader.SetGlobalFloat(_Pwr, Mathf.Pow(2, pwr)); Shader.SetGlobalVector(_A, a); Shader.SetGlobalVector(_C, c); Shader.SetGlobalInt(_R, solutionManager.GetR()); Shader.SetGlobalInt(_M, solutionManager.GetM()); Shader.SetGlobalFloat(_Lambda, lambda); }