GLSL Shader Loader for Webpack

JSON →
library 0.1.6 ·javascript maintenance
verified May 27, 2026

glsl-shader-loader is a Webpack loader designed to bundle GLSL shader source code, enabling modular management of shaders for WebGL applications. It allows developers to organize GLSL functions into separate files and import them using a custom `#pragma loader: import` syntax directly within other `.glsl` files. The loader performs static analysis to resolve dependencies, remove unused functions, and ensure functions are imported only once, resulting in an optimized shader string ready for use with WebGL. As of version 0.1.6, it focuses on providing a preprocessor-like experience for GLSL, which is useful for complex shader graphs and code reuse. Its release cadence appears to be slow, with the latest version indicating an early stage or a stable, low-maintenance tool rather than rapid development. Key differentiators include its syntax tree analysis for dependency resolution and optimization, which goes beyond simple string concatenation.

total hits 16
actors 7 distinct systems
last hit 1d ago human
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · AE · 🇩🇪 Germany