【Web3D】Shaders
| 1 minute read | Using 110 words
Shaders
- A material rendered with custom shader is a small program written in
GLSL
that runs onGPU
- Use case:
- Implement an effect not inlcuded with any of the built-in materials。
Uniforms
- provide us a way to send data from JavaScript to our shader.
- we can use uniforms both Vertex and Fragment
- use case:
- Pass mouse position data
- Time information
- Color
- Textures
- (etc.)
Vertex Shader
- The vertex shaser runs
first
; - It will receives attributes, calculates / manipulates the postion of each individual vertex
- Position the vertices of geometry
Fragment Shader
Page link: /post/web3dshaders/