Translate Mathf.PerlinNoise into shader

unitys treeeditor perlinnoise source is available,

maybe its similar to mathf (which is not published…) ?