Learn OpenGL Examples

Unofficial WebGL examples for learnopengl.com

Getting started

Hello Window

rendering

Read More

Hello Triangle

triangle

Read More

quad

Read More

quad-wireframe

Read More

Shaders

in-out

Read More

uniforms

Read More

attributes

Read More

Textures

texture

Read More

texture-blend

Read More

multiple-textures

Read More

Transformations

scale-rotate

Read More

rotate-translate

Read More

Coordinate Systems

plane

Read More

cube

Read More

more-cubes

Read More

Camera

lookat

Read More

walk

Read More

look

Read More

Lighting

Colors

scene

Read More

Basic Lighting

ambient

Read More

diffuse

Read More

specular

Read More

Materials

material

Read More

light

Read More

light-colors

Read More

Lighting Maps

diffuse-map

Read More

specular-map

Read More

Light Casters

directional-light

Read More

point-light

Read More

spot-light

Read More

soft-spot-light

Read More

Multiple Lights

combined-lights

Read More

Model Loading

Model

backpack-diffuse

Read More

backpack-lights

Read More

Advanced OpenGL

Depth Testing

depth-always

Read More

depth-less

Read More

depth-buffer

Read More

linear-depth-buffer

Read More

Stencil Testing

object-outlining

Read More

Blending

grass-opaque

Read More

grass-transparent

Read More

blending

Read More

blending-sorted

Read More

Face Culling

cull-front

Read More

Framebuffers

render-to-texture

Read More

inversion

Read More

grayscale

Read More

sharpen

Read More

blur

Read More

edge-detection

Read More

Cubemaps

skybox

Read More

relfection-cube

Read More

relfection-backpack

Read More

refraction-cube

Read More

refraction-backpack

Read More

Advanced GLSL

point-size

Read More

frag-coord

Read More

front-facing

Read More

uniform-buffers

Read More

Geometry Shader

Webgl does not provide support for geometry shaders. As an alternative the following examples emulate the behavior by using data textures in the vertex shader.

lines

Read More

houses

Read More

exploding-object

Read More

visualizing-normals

Read More

Instancing

instancing

Read More

instanced-arrays

Read More

asteroid-field

Read More

asteroid-field-instanced

Read More

Anti Aliasing

msaa

Read More

offscreen-msaa

Read More

grayscale-msaa

Read More

Advanced Lighting

blinn-phong

Read More

Gamma Correction

gamma-correction

Read More

Shadow Mapping

mapping-depth

Read More

rendering-shadows

Read More

improved-shadows

Read More

Point Shadows

omnidirectional-depth

Read More

omnidir-shadows

Read More

omnidirectional-PCF

Read More

Normal Mapping

normal-mapping

Read More

tangent-space

Read More

complex-object

Read More