3 ms·
A simplified use case is to generate a checkerboard texture, just compute (x ^ y) and look at bit zero: color = ((x ^ y) & 1) ? black : white;
by flohofwoe 2y ago
A simplified use case is to generate a checkerboard texture, just compute (x ^ y) and look at bit zero:
color = ((x ^ y) & 1) ? black : white;
- pavlov 2y agoI wonder if someone has written a GPU shader that can play a game of chess inside a 8x8 checkerboard texture.
- flohofwoe 2y agoGoogling finds a shadertoy that's halfway there ;) (knows about chess rules, but can't play on its own): https://www.shadertoy.com/view/wstBz4 https://www.shadertoy.com/view/wstBz4