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); }