OGL
freeMinimal WebGL library (about a tenth of three.js) for custom shader effects.

Try these
three.js
The standard WebGL and WebGPU 3D engine: scenes, cameras, materials, loaders.
Paper Shaders
Zero-dependency WebGL shader backgrounds: mesh gradients, grain, dithering, liquid metal and more.
React Bits
200+ free animated React components, text effects and backgrounds in JS/TS and CSS/Tailwind flavours.
Recharts
Composable SVG charts for React; the engine behind shadcn/ui charts.
Looks that pick it
For your agent
Install
npm i oglUse it for
- a single full-screen fragment shader background you write yourself
- lightweight WebGL hover or distortion effects on images
- porting React Bits-style shader backgrounds without pulling in three.js
Skip it when
- you want a ready-made gradient or texture: use paper-shaders
- real 3D scenes with models, lights and controls: use r3f or three
What's inside35 free
- Renderer
- Camera
- Transform
- Mesh
- Geometry
- Program
- Texture
- RenderTarget
- Math (Vec, Mat, Quat, Euler, Color)
- Plane
- Box
- Sphere
- Cylinder
- Torus
- Triangle
- Orbit
- Raycast
- Curve
- Path
- Tube
- Polyline
- Post
- Flowmap
- GPGPU
- Shadow
- Text
- Skin
- Animation
- InstancedMesh
- GLTFLoader
- TextureLoader
- KTXTexture
- WireMesh
- AxesHelper
- GridHelper
Facts
- Frameworks
- vanilla, react, vue, svelte, solid, angular
- Styling
- unstyled
- Weight
- small
- Accessibility
- n/a
- Maturity
- stable
- License
- Unlicense
- Price
- Free
Pairs with
Alternatives
import { Renderer, Program, Mesh, Triangle } from 'ogl'
const el = document.getElementById('bg')!
const renderer = new Renderer({ dpr: Math.min(devicePixelRatio, 2) })
const gl = renderer.gl
el.appendChild(gl.canvas)
renderer.setSize(el.clientWidth, el.clientHeight)
const program = new Program(gl, {
vertex: `attribute vec2 position; void main() { gl_Position = vec4(position, 0., 1.); }`,
fragment: `precision highp float; uniform float uTime; void main() { gl_FragColor = vec4(0.5 + 0.5 * sin(uTime + gl_FragCoord.xxy / 200.), 1.); }`,
uniforms: { uTime: { value: 0 } },
})
const mesh = new Mesh(gl, { geometry: new Triangle(gl), program })
requestAnimationFrame(function loop(t) { program.uniforms.uTime.value = t / 1000; renderer.render({ scene: mesh }); requestAnimationFrame(loop) })https://oframe.github.io/ogl/examples/
Loading website