01 Fragments and data
UV: an address on the surface
X becomes red, Y becomes green. Move the pointer to read the coordinate.
UV01
01
Exercise
Runs once per pixelDrag numbers, or edit the code
JS side
UV is a surface coordinate; on this plane bottom left is (0,0) and top right (1,1), unlike screen pixels.
Try it
- Set the U weight to 0: the red gradient disappears
- Change 0.25 to 1.0 and blue fills everything