- Real-Time 3D Graphics with WebGL 2
- Farhad Ghayour Diego Cantor
- 70字
- 2021-06-10 19:42:57
Have a Go: Changing the Square Color
Go to the fragment shader and change the color of your geometry.
Four-Component Color Vector
The format is (red, green, blue, alpha). Alpha is always 1.0 (for now), and the first three arguments are float numbers in the range of 0.0 to 1.0.
The format is (red, green, blue, alpha). Alpha is always 1.0 (for now), and the first three arguments are float numbers in the range of 0.0 to 1.0.
Remember to save the file after making the changes in your text editor before opening it in your browser.