docs.rs failed to build ash_renderer-0.2.7
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
ash_renderer-0.4.30
ASH Renderer
A production-quality Vulkan renderer built with ASH (Vulkan bindings) and VMA (GPU memory allocator).
ECS-free, pure rendering engine - decoupled camera and input handling, ready for any game engine.
Features
- 🎨 PBR Materials - Physically-based rendering with metallic/roughness workflow
- 🌑 Shadow Mapping - Cascaded shadow maps with PCF filtering
- ✨ Post-Processing - Bloom, tonemapping, and temporal anti-aliasing
- 📊 GPU Profiling - Built-in timing queries and performance diagnostics
- 🔌 Feature System - Extensible plugin architecture for rendering features
- 🚀 High Performance - 60+ FPS @ 1080p with 1000+ objects
- 🔧 LOD System - Automatic level-of-detail management
- ⚡ GPU Instancing - Efficient batch rendering
- 👁️ Occlusion Culling - GPU-accelerated visibility testing
- 🔄 Hot Reloading - Automatic shader recompilation and pipeline recreation on file change
- 🛡️ Robust Validation - GPU-assisted validation with automatic fallback (VK_EXT_validation_features)
- 🍃 Alpha Testing - Support for transparent shadows (e.g. foliage)
- 💡 Light Culling - Tiled/clustered forward rendering
Quick Start
Add to your Cargo.toml:
[]
= "0.1.2"
= "0.30" # Required for math types
Basic Usage
## Examples
```bash
# Simple triangle
cargo run --example 01_triangle
# Textured cube with materials
cargo run --example 02_cube
# GLTF model loading
cargo run --example 03_model_loading --features gltf_loading
API Overview
Renderer
// Create renderer
// Note: We now pass the &Window directly.
// Windows, Linux (X11/Wayland), and macOS are supported.
let mut renderer = new?;
// Set mesh and material
renderer.set_mesh;
*renderer.material_mut = Material ;
// Per-frame: compute camera matrices (your game engine controls this)
let camera_pos = new;
let view = look_at_rh;
let mut proj = perspective_rh;
proj.y_axis.y *= -1.0; // Vulkan Y-flip
// Render with explicit camera data (stateless API)
renderer.render_frame?;
// Handle resize
renderer.request_swapchain_resize;
Mesh Creation
// Built-in primitives
let cube = create_cube;
let sphere = create_sphere;
let plane = create_plane;
// Custom mesh
let mesh = new;
Materials
let material = Material ;
Architecture
ash_renderer/
├── src/
│ ├── vulkan/ # Low-level Vulkan abstractions
│ │ ├── device.rs # Logical device management
│ │ ├── pipeline.rs # Graphics/compute pipelines
│ │ ├── shader.rs # Shader loading & reflection
│ │ └── ...
│ ├── renderer/ # High-level rendering API
│ │ ├── renderer.rs # Main Renderer struct
│ │ ├── resources/ # GPU resources (mesh, texture, material)
│ │ ├── features/ # Extensible feature system
│ │ └── diagnostics/ # Profiling & debugging
│ └── shaders/ # GLSL shader sources
└── examples/ # Usage examples
Performance
| Metric | Target | Achieved |
|---|---|---|
| FPS @ 1080p | 60+ | ✅ |
| Objects | 1000+ | ✅ |
| Memory (idle) | < 200MB | ✅ |
| Frame time | < 16.6ms | ✅ |
Feature Flags
| Feature | Description | Default |
|---|---|---|
validation |
Vulkan validation layers | ✅ |
gltf_loading |
GLTF model loading | ✅ |
shader_compilation |
Runtime shader compilation | ❌ |
profiling |
GPU profiling queries | ❌ |
parallel |
Parallel command recording | ❌ |
Requirements
- Rust: 1.70+
- Vulkan: 1.2+ capable GPU
- Vulkan SDK: For validation layers (optional)
Author
Saptak Santra
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Made with ❤️ and Vulkan