The Lightweight Procedural Texture Library for Modern Web Apps
TexGen (~15kb): A small JavaScript library that leverages WebGL shaders to create high-quality, procedural textures on the fly. Whether you need static baked images or real-time animated backgrounds, TexGen provides the tools to build them.
TexGen Words (~20kb): An addon to TexGen to describe your textures in plain English. This powerful addon provides a natural language interface to combine complex effects without writing code:
Instantly turn phrases like "blue fire spiral warp" or "gold neon glowing lava" into high-performance GPU shaders.
The sky below is generated from a single 2KB compressed string. Decompressed and rendered in real-time, it supports dynamic time of day and atmospheric effects.
Use TexGen Words to synthesize textures using natural language. Try typing keywords like lava, spiral, or neon.
The full IDE for creating, compressing, and exporting your own procedural textures.
Generate complex procedural textures using just a natural language sentence. Try the Random Gallery!
A live, interactive documentation tool for experimenting with the TexGen library methods.
A modern technical showcase of type-safe baking, real-time animation, and compressed payloads.
Infinite procedural world generation using asynchronous Web Workers and OffscreenCanvas.
Advanced visual effects achieved by chaining multiple TexGen instances for post-processing.
A 2D game where every block, enemy, and background is procedurally generated at runtime.
A first-person explorer featuring real-time animated textures on walls, floors, and ceilings.
Navigate a 3D cube by tilting and rolling through portals and procedural mazes on every face.
An orthographic 2.5D physics game with procedural marble, floor tiles, and environmental hazards.
Fly over an endless procedural landscape with an animated day/night cycle, rendered from compressed shaders.
A procedural UI demo where every card's artwork and ornate frame is uniquely generated using seeds.
A fully functional Klondike Solitaire game featuring a procedural felt table, ornate card backs, and subtle paper textures.
Stop shipping megabytes of PNGs. A complex atmospheric sky or high-res terrain displacement map can be reduced to a 1KB string. Ideal for web games and high-performance applications where every kilobyte counts.
By simply changing a seed uniform, you can generate millions of unique variations from a single shader. Perfect for roguelikes, loot items, procedural characters, or unique planetary surfaces.
Modern LLMs are experts at writing GLSL noise and geometric logic. Ask an AI to "generate a procedural lava shader," paste the code into TexGen, and you have a unique, optimized asset in seconds without traditional painting.
Calculations happen directly on the GPU. Bake high-resolution 4K textures in milliseconds, or run complex animated environments at 60FPS without putting a strain on the main JavaScript thread.
TexGen outputs standard HTMLCanvasElement or DataURLs. This means it integrates instantly with Three.js, Babylon.js, PixiJS, or even standard CSS background properties.
Mathematical textures never lose detail. Generate textures at the exact resolution needed for the user's screen, from tiny icons to massive full-screen backgrounds, all without any blurriness.