Esempio n. 1
0
        public static EncodingDefinition GetEncodingDefinition(MtTexPlatform platform)
        {
            var definition = new EncodingDefinition();

            switch (platform)
            {
            case MtTexPlatform.N3DS:
                definition.AddColorEncodings(CtrFormats);
                break;

            case MtTexPlatform.Switch:
                definition.AddColorEncodings(SwitchFormats);
                break;

            case MtTexPlatform.PS3:
                definition.AddColorEncodings(Ps3Formats);
                definition.AddColorShaders(Shaders);
                break;

            case MtTexPlatform.Mobile:
                definition.AddColorEncodings(MobileFormats);
                break;

            case MtTexPlatform.Wii:
                throw new InvalidOperationException("Cannot obtain encoding definition for Wii MT Tex.");
            }

            return(definition);
        }
Esempio n. 2
0
        public static EncodingDefinition GetEncodingDefinition()
        {
            var definition = new EncodingDefinition();

            definition.AddColorEncodings(Formats);
            definition.AddColorShaders(Shaders);

            return(definition);
        }
Esempio n. 3
0
        public static EncodingDefinition GetEncodingDefinition()
        {
            var definition = new EncodingDefinition();

            definition.AddColorEncodings(ColorFormats);
            definition.AddPaletteEncodings(ColorFormats);

            definition.AddIndexEncodings(IndexFormats.ToDictionary(x => x.Key, y => new IndexEncodingDefinition(y.Value, new[] { 0, 1, 2 })));

            // HINT: The color shader is only applied on color encodings or palette encodings
            // Since both, color encodings and palette encodings, share the same encodings declaration
            // They also share the same shader declaration
            definition.AddColorShaders(Shaders);
            definition.AddPaletteShaders(Shaders);

            return(definition);
        }