Example #1
0
        public BtxState()
        {
            _btx = new BTX();

            EncodingDefinition = BtxSupport.Encodings.ToColorDefinition();
            EncodingDefinition.AddPaletteEncodings(BtxSupport.PaletteEncodings);
            EncodingDefinition.AddIndexEncodings(BtxSupport.IndexEncodings);
        }
Example #2
0
        public static EncodingDefinition GetEncodingDefinition()
        {
            var definition = new EncodingDefinition();

            definition.AddPaletteEncodings(PaletteFormats);
            definition.AddIndexEncodings(IndexFormats.Select(x => (x.Key, new IndexEncodingDefinition(x.Value, new[] { 0 }))).ToArray());

            return(definition);
        }
Example #3
0
        public static EncodingDefinition GetEncodingDefinition()
        {
            var definition = new EncodingDefinition();

            definition.AddColorEncodings(ColorFormats);
            definition.AddPaletteEncodings(PaletteFormats);
            definition.AddIndexEncodings(IndexFormats);

            return(definition);
        }
Example #4
0
        public static EncodingDefinition GetEncodingDefinition()
        {
            var definition = new EncodingDefinition();

            definition.AddPaletteEncodings(PaletteEncodings);
            definition.AddIndexEncodings(IndexFormats.Select(x => (x.Key, new IndexEncodingDefinition(x.Value, new[] { 0x6C09, 0x6409 }))).ToArray());

            definition.AddPaletteShader(0x6C09, new HtexColorShader());

            return(definition);
        }
Example #5
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);
        }