public override void GenerateSamples(ref MapPixelData mapPixel)
        {
            mapPixel.maxHeight = MaxTerrainHeight;
            var computer = TerrainComputer.Create(mapPixel, this);

            computer.DispatchAndProcess(InterestingTerrains.csPrototype, ref mapPixel, InterestingTerrains.instance.csParams);
        }
        private static void LoadAssetsAndParams()
        {
            Mod.LoadAllAssetsFromBundle();

            biomeMap           = Mod.GetAsset <Texture2D>("daggerfall_heightmap");
            derivMap           = Mod.GetAsset <Texture2D>("daggerfall_deriv_map");
            tileableNoise      = Mod.GetAsset <Texture2D>("tileable_noise");
            csPrototype        = Mod.GetAsset <ComputeShader>("TerrainComputer");
            mainHeightComputer = Mod.GetAsset <ComputeShader>("MainHeightmapComputer");

#if UNITY_EDITOR
            instance.csParams = ScriptableObject.CreateInstance <TerrainComputerParams>();
#else
            instance.csParams = new TerrainComputerParams();
#endif

            var paramIni = Mod.GetAsset <TextAsset>("interesting_terrains");
            var ini      = new IniParser.Parser.IniDataParser().Parse(paramIni.text);
            instance.csParams.FromIniData(ini);
            TerrainComputer.InitializeWoodsFileHeightmap();
        }
 private void OnDestroy()
 {
     TerrainComputer.Cleanup();
 }