Tag Info

New answers tagged


Another way to do this is to make a texture that maps each RGB to a colour on the palette, an image like this (from the NES colours): Then in a post processing shader you can the RGB colour from your regular image in a way like this: uniform sampler2d paletteMapping; vec3 mapColor( vec3 realColor ) { vec3 mappedColors = floor( realColor * 16 ); ...


This problem is called Color quantization. Basically for each pixel you want to find a closest color present in the palette. This can be done by partitioning the 3D color space into regions each of which containing exactly one palette color. The partitioning can be performed using e.g. Voronoi diagram, octree or any other spatial partitioning data structure. ...

Top 50 recent answers are included