static PaintContext InitializePaintContext(Terrain terrain, Texture target, RenderTextureFormat pcFormat, Rect boundsInTerrainSpace, int extraBorderPixels = 0) { PaintContext ctx = PaintContext.CreateFromBounds(terrain, boundsInTerrainSpace, target.width, target.height, extraBorderPixels); ctx.CreateRenderTargets(pcFormat); return(ctx); }
internal static PaintContext InitializePaintContext(Terrain terrain, int targetWidth, int targetHeight, RenderTextureFormat pcFormat, Rect boundsInTerrainSpace, int extraBorderPixels = 0, bool texelPadding = true) { PaintContext ctx = PaintContext.CreateFromBounds(terrain, boundsInTerrainSpace, targetWidth, targetHeight, extraBorderPixels, texelPadding); ctx.CreateRenderTargets(pcFormat); return(ctx); }
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); }