01 Fragments and data
float, int, bool: stricter than C
A float sets brightness, an int sets the stripe count, a bool flips it. Then try a C habit.
01
112
Exercise
Runs once per pixelDrag numbers, or edit the code
JS side
GLSL never converts types implicitly: a float is written 1.0, and int times float is an error.
Try it
- Switch “C habit” and read the GPU’s real error message
- Delete a semicolon yourself and see which line the error points to
- Change int(count) to float, then fix it