ScratchData LogoScratchData
Back to Java_Programmer's profile

XOR Texture

JAJava_Programmer•Created May 30, 2017
XOR Texture
17
10
249 views
View on Scratch

Instructions

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.

Description

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. :)

Project Details

Project ID163867762
CreatedMay 30, 2017
Last ModifiedJune 4, 2017
SharedMay 31, 2017
Visibilityvisible
CommentsAllowed