Three.js Journey Notes 6 - Shaders Part1
What is a shader
- one of the main components of WebGL
- a program written in GLSL
- sent to GPU
- Position each vertex of a geometry
- Colorize each visible “pixel” (accurately should be using term “fragment”) of that geometry
Then we send a lot of data to the shader such as the vertices coordinates, the mesh transformation, information about the camera and its field of view, parameters like the color, the textures, the lights, the fog, etc. The GPU then processes all of this data following the shader instructions, and our geometry appears in the render.