Palette Swap

March 2015 | By Sam Twidale


Video Play Button
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:

Built with: