Zephyr3d is an open sourced 3d rendering framework for browsers that supports both WebGL and WebGPU, developed in TypeScript.
Introduction
Zephyr3d is primarily composed of two sets of APIs: the Device API and the Scene API.
- Device API
The Device API provides a set of low-level abstraction wrapper interfaces, allowing users to call the WebGL, WebGL2, and WebGPU graphics interfaces in the same way. These interfaces include most of the functionality of the underlying APIs, making it easy to support cross-API graphics rendering. - Scene API
The Scene API is a high-level rendering framework built on top of the DeviceAPI, serving as both a test environment for the Device API and a direct tool for graphics development. Currently, the Scene API has implemented features such as PBR rendering, cluster lighting, shadow mapping, terrain rendering, and post-processing.
changes in v0.4.0
- Performance Optimization Rendering Pipeline Optimization
Optimize uniform data submission, reduce the number of RenderPass switches.
Optimize the performance of geometric instance rendering.
Customize the rendering queue cache within batches to reduce the CPU usage of rendering queue construction. - Command Buffer Reuse
Command Buffer Reuse can reduce CPU load, improve GPU utilization, and significantly improve rendering efficiency. This version now supports command buffer reuse for each rendering batch when using the WebGPU device (using GPURenderBundle), significantly improving the performance of the application.
Demos:
Drawcall benchmark(requires WebGPU)