Click the green flag to switch between a rainbow texture and a black and white texture. Press the space bar to choose the red, green, and blue values for the specific color. How it Works: - X and Y values are converted to binary. - The XOR operation is performed on each digit of the binary numbers (if x=y, 0; if not(x=y), 1). - The new number is converted back to base 10 and the color or shade is determined by dividing the new number by the maximum possible number.
I was looking into raycasting tutorials and saw this neat texture! I had heard of an XOR gate before, but I had never heard of using it like this, so I tried it out. :)