WebGL2 Tutorial

This is a tutorial series for WebGL2. It is based on WebGL2 Fundamentals by Gregg Tavares, Learn OpenGL, and Maxime Euzière's WebGL guide.

Many examples use μGL and/or μMath after their concept has been demonstrated without a library in order to reduce their complexity.

See the glossary here.

Index

  1. Introduction to WebGL
    • The WebGL API
  2. Shaders
    • GLSL
    • Shader Programs
  3. Program Structure
    • Initialization
    • Rasterization
      • Clearing Color Buffers
      • Resizing the Viewport
    • Cheat Sheet
  4. Attributes
    • Buffers
    • Vertex Array Objects
    • Rasterizing
    • Indices
  5. Uniforms
  6. Varyings
  7. Transformation
    • Translation
    • Rotation
    • Scaling
    • Matrices
      • Matrix Translation
      • Matrix Rotation
      • Matrix Scaling
      • Orthographic Projection
  8. The Scene Graph
  9. 3D
    • Orthographic 3D
    • Polygon Culling
    • Depth Testing
    • Perspective
    • Cameras
  10. Textures
    • Parameters
    • Texture Atlases
    • Data Textures
    • Projection Mapping
  11. Framebuffers
    • Rendering to Textures
  12. Lighting
    • Directional Lighting
    • Colored Lighting
    • Ambient Lighting
    • Point Lighting
    • Specular Lighting
    • Spot Lighting
  13. Cubemaps
    • Environment Maps
    • Skyboxes
  14. Shadows
    • Shadow Maps
    • Shadow Acne
  15. Fog
  16. Transparency
  17. Text
    • Glyph Textures
  18. GPGPU
  19. Picking
  20. Image Processing
  21. Skinning
  22. Handling Lost Context