https://github.com/mizy/minigpu
a high-performance webGPU rendering engine
https://github.com/mizy/minigpu
3d 3d-renderer rust webgpu
Last synced: 3 months ago
JSON representation
a high-performance webGPU rendering engine
- Host: GitHub
- URL: https://github.com/mizy/minigpu
- Owner: mizy
- License: mit
- Created: 2023-05-31T08:22:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-13T03:53:22.000Z (5 months ago)
- Last Synced: 2025-06-04T16:41:27.846Z (5 months ago)
- Topics: 3d, 3d-renderer, rust, webgpu
- Language: Rust
- Homepage:
- Size: 18.2 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MiniGPU
MiniGPU is a simple and lightweight graphics library for Rust. It is designed to be easy to use and easy to understand. It is based on the `wgpu` library and provides a simple and easy-to-use API for rendering 3D graphics and ready for gpu compute.
now it's still in development, and the API may change.# Features
- [x] Simple and easy-to-use API for web frontend developers
- [x] Support for rendering 2D/3D graphics
- [x] Build-in shader include
- [x] ECS architecture
- [x] Support for gpu compute# Example
```sh
# Run the examples with the `examples` directory
cargo run --example triangle
cargo run --example image
cargo run --example objloader
```# WebAssembly example
https://mizy.github.io/miniGPU/examples/wasm/# wgsl shader
## bind group index
+ group(0) for material uniform
+ group(1) for camera uniform
use from group(10) for other uniform binding## build-in shader include
you can use #include, #define, #ifdef, #endif in shader code,
view `src/components/materials/shaderlibs` for more detail
```wgsl
#include
#include#define USE_CAMERA_UNIFORM
#ifdef USE_CAMERA_UNIFORM
#include #include
#endif```
# todo
- [] deferred rendering
- [] PBR material
- [] controls enhence
- [] orthographic camera enhence
- [] group matrix mutiply
- [] a simple game demo# weakness
for web platform, the wasm file is huge, and also dont imporve a lot for performance# git
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa_account1
ssh-add ~/.ssh/id_rsa_account2