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.
- Simple and easy-to-use API for web frontend developers
- Support for rendering 2D/3D graphics
- Build-in shader include
- ECS architecture
- Support for gpu compute
# Run the examples with the `examples` directory
cargo run --example triangle
cargo run --example image
cargo run --example objloader
https://mizy.github.io/miniGPU/examples/wasm/
- group(0) for material uniform
- group(1) for camera uniform
use from group(10) for other uniform binding
you can use #include, #define, #ifdef, #endif in shader code,
view src/components/materials/shaderlibs
for more detail
#include <CameraUniform>
#include <VertexStruct>
#define USE_CAMERA_UNIFORM
#ifdef USE_CAMERA_UNIFORM
#include #include <CameraUniform>
#endif
- [] force-directed graph layout render
- [] a simple game demo