Page 2
Hardware accelerated
graphics
Page 3
No additional software
Page 6
“The WebGL API may be too tedious to use directly without some utility libraries” - Wikipedia
Page 11
Graphics Pipeline
Page 12
(0,0)
(1,-2)
(2,1)
Page 13
vertex shader
rasterise
fragment shaderblending
make shapes
Page 14
vertex shader
rasterise
fragment shaderblending
make shapes
Page 15
vertex shader
rasterise
fragment shaderblending
make shapes
Page 16
world space
screen space
transformsmodel vertices
vertex shader
Page 17
world space
screen space
vertex shader
Page 18
world space
screen space
vertex shader
Page 19
Screenshot: The Eight Thousanders
world space
screen space
vertex shader
Page 22
vertex shader
rasterise
fragment shaderblending
make shapes
Page 23
attributes
colour
fragment shader
Page 24
vec4(1.0, 0.0, 0.0, 1.0);
attributes
colour
fragment shader
Page 25
attributes
colour
fragment shader
vec4(1.0, 0.0, 0.0, 1.0);
Page 26
coords
attributes
colour
fragment shader
vec4(coords.x, 0.0, 0.0, 1.0);
Page 27
attributes
colour
fragment shader
coords
vec4(coords.x, 0.0, 0.0, 1.0);
Page 28
attributes
colour
fragment shader
coords
vec4(coords.y, 0.0, 0.0, 1.0);
Page 29
attributes
colour
fragment shader
coords
vec4(coords.z, 0.0, 0.0, 1.0);
Page 30
attributes
colour
fragment shader
coords, texture, lightPos, normals
texture2D(texture, coords) + light
Page 33
Three.js + Shaders