Palette Swap
March 2015 | By Sam Twidale
Collection:
A colourful city using palette swapping. Use the side bar to try different settings and palettes.
How it works: this experiment does regular phong shading on a model of a city and then indexes into a palette texture based on luminance of the fragment to pick the final colours. A directional light hovering over the scene causes the nice colour variations. Get the code here: https://github.com/Tw1ddle/webgl-palette-shader