A collection of raw WebGL 2 implementations demonstrating rendering algorithms with minimal abstraction.
WebGL 2 Examples is a collection of rendering algorithms implemented directly in raw WebGL 2 with minimal abstraction. It demonstrates how to build techniques like deferred rendering, depth of field, and ambient occlusion using low-level WebGL 2 APIs, providing clear, sequential views of all GL calls.
Graphics programmers, WebGL developers, and students learning real-time rendering who want to understand the underlying WebGL 2 commands behind common algorithms.
Developers choose this project for its transparent, unabstracted code that reveals exactly how WebGL 2 features combine to implement rendering algorithms, serving as a practical complement to feature-specific WebGL 2 samples.
Rendering algorithms implemented in raw WebGL 2.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All examples avoid abstractions, showing every GL call in sequential order—for instance, the deferred rendering example explicitly lists uniform buffers and multiple render targets without helper functions, making it easy to trace execution.
Includes advanced techniques like deferred rendering, order-independent transparency, and SSAO, demonstrating how to combine WebGL 2 features such as transform feedback and occlusion queries into complete rendering pipelines.
Each algorithm is contained in one HTML file with shaders at the top, as seen in the depth of field example, allowing developers to grasp the entire implementation without navigating multiple files.
Designed to complement the WebGL 2 Samples Pack by focusing on full algorithm implementations, bridging the gap between isolated feature demonstrations and practical rendering techniques.
The lack of abstractions and single-file structure makes code hard to reuse or scale—for example, GL calls are not encapsulated, leading to duplication and difficulty in debugging for larger projects.
It relies solely on raw WebGL 2 without support for modern tooling or frameworks, so developers must manually handle setup and compatibility, as noted in the reliance on external utils like glMatrix for math.
Assumes familiarity with low-level WebGL 2 concepts, offering minimal guidance beyond code comments—beginners might struggle with concepts like occlusion queries or EXT_color_buffer_float without additional resources.