static PaintContext InitializePaintContext(Terrain terrain, Rect bounds, int inputTextureWidth, int inputTextureHeight, RenderTextureFormat colorFormat)
        {
            PaintContext ctx = new PaintContext();

            ctx.CalculateBrushRect(terrain, bounds, inputTextureWidth, inputTextureHeight);
            ctx.CreateTerrainTiles(terrain, inputTextureWidth, inputTextureHeight);
            ctx.CreateRenderTargets(colorFormat);
            return(ctx);
        }