public static TextureFormat ToTextureFormat(Alt.Sketch.PixelFormat format) { switch (format) { case Alt.Sketch.PixelFormat.Format8bppAlpha: return(TextureFormat.Alpha8); case Alt.Sketch.PixelFormat.Format24bppRgb: return(TextureFormat.RGB24); case Alt.Sketch.PixelFormat.Format32bppArgb: return(TextureFormat.RGBA32); } return(TextureFormat.RGBA32); }
public static RenderTextureFormat ToRenderTextureFormat(Alt.Sketch.PixelFormat format) { switch (format) { case Alt.Sketch.PixelFormat.Format8bppAlpha: return(RenderTextureFormat.Default); case Alt.Sketch.PixelFormat.Format24bppRgb: return(RenderTextureFormat.Default); case Alt.Sketch.PixelFormat.Format32bppArgb: return(RenderTextureFormat.ARGB32); } return(RenderTextureFormat.Default); }
protected override Alt.Sketch.Rendering.Texture CreateRenderTexture(int width, int height, Alt.Sketch.PixelFormat format) { return(new Unity_RenderTexture(this, width, height, format)); }