Exemplo n.º 1
0
        override public string GetInfoString()
        {
            RenderTexture t = target as RenderTexture;

            string info = t.width + "x" + t.height;

            if (t.dimension == UnityEngine.Rendering.TextureDimension.Tex3D)
            {
                info += "x" + t.volumeDepth;
            }

            if (!t.isPowerOfTwo)
            {
                info += "(NPOT)";
            }

            if (QualitySettings.desiredColorSpace == ColorSpace.Linear)
            {
                bool formatIsHDR = GraphicsFormatUtility.IsIEEE754Format(t.graphicsFormat);
                bool sRGB        = t.sRGB && !formatIsHDR;
                info += " " + (sRGB ? "sRGB" : "Linear");
            }

            info += "  " + t.graphicsFormat;
            info += "  " + EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(t));

            return(info);
        }
Exemplo n.º 2
0
        public override string GetInfoString()
        {
            Texture3D tex    = target as Texture3D;
            var       format = TextureUtil.GetTextureFormatString(tex.format);
            var       size   = EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(tex));
            string    info   = $"{tex.width}x{tex.height}x{tex.depth} {format} {size}";

            return(info);
        }
Exemplo n.º 3
0
        public override string GetInfoString()
        {
            Texture3D tex = target as Texture3D;

            string info = UnityString.Format("{0}x{1}x{2} {3} {4}",
                                             tex.width, tex.height, tex.depth,
                                             TextureUtil.GetTextureFormatString(tex.format),
                                             EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(tex)));

            return(info);
        }
Exemplo n.º 4
0
        public override string GetInfoString()
        {
            Texture2DArray tex = (Texture2DArray)target;

            string info = UnityString.Format("{0}x{1} {2} slice{5} {3} {4}",
                                             tex.width, tex.height, tex.depth,
                                             TextureUtil.GetTextureFormatString(tex.format),
                                             EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(tex)),
                                             tex.depth != 1 ? "s" : "");

            return(info);
        }
Exemplo n.º 5
0
        public override string GetInfoString()
        {
            Texture3D texture3D = base.target as Texture3D;

            return(string.Format("{0}x{1}x{2} {3} {4}", new object[]
            {
                texture3D.width,
                texture3D.height,
                texture3D.depth,
                TextureUtil.GetTextureFormatString(texture3D.format),
                EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(texture3D))
            }));
        }
Exemplo n.º 6
0
        public override string GetInfoString()
        {
            RenderTexture renderTexture = base.target as RenderTexture;
            string        text          = renderTexture.width + "x" + renderTexture.height;

            if (renderTexture.dimension == TextureDimension.Tex3D)
            {
                text = text + "x" + renderTexture.volumeDepth;
            }
            if (!renderTexture.isPowerOfTwo)
            {
                text += "(NPOT)";
            }
            if (QualitySettings.desiredColorSpace == ColorSpace.Linear)
            {
                bool flag  = RenderTextureEditor.IsHDRFormat(renderTexture.format);
                bool flag2 = renderTexture.sRGB && !flag;
                text = text + " " + ((!flag2) ? "Linear" : "sRGB");
            }
            text = text + "  " + renderTexture.format;
            return(text + "  " + EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(renderTexture)));
        }
        public override string GetInfoString()
        {
            var tex  = (Texture2DArray)target;
            var info = $"{tex.width}x{tex.height} {tex.depth} slice{(tex.depth != 1 ? "s" : "")} {TextureUtil.GetTextureFormatString(tex.format)} {EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySizeLong(tex))}";

            return(info);
        }
Exemplo n.º 8
0
 public static int GetRuntimeMemorySize(Texture t)
 {
     return((int)TextureUtil.GetRuntimeMemorySizeLong(t));
 }