(开发中) 基于OpenGL的路径追踪引擎,由C++实现
 
 
 
 
 
Go to file
ternaryop8479 7de250ec79 docs: 添加README.md 2026-02-15 22:14:03 +08:00
examples chore: 将screen_blit shader的加载方式从硬编码修改为由shader_manager加载 2026-02-14 23:55:41 +08:00
include refactor: 删除config模块无用内容 2026-02-15 15:49:21 +08:00
lib fix: 修复CMake过程中找不到spdlog头文件编译报错问题 2026-02-15 00:03:49 +08:00
res/logo First commit: Basic logic and implementation. 2026-01-25 09:29:36 +08:00
scripts Fix:修改.gitignore,不上传LSP语言文件 2026-02-11 12:30:33 +08:00
shaders feat:添加降噪模块(均值滤波) 2026-02-11 23:37:25 +08:00
src refactor: 删除config模块无用内容 2026-02-15 15:49:21 +08:00
.gitignore refactor:移除include/extended_folders.list,上传lib/stb中内容 2026-02-11 22:52:54 +08:00
CMakeLists.txt build:编写CMakeLists.txt 2026-02-11 23:23:50 +08:00
LICENSE First commit: Basic logic and implementation. 2026-01-25 09:31:06 +08:00
README.md docs: 添加README.md 2026-02-15 22:14:03 +08:00
README_zh.md docs: 添加README.md 2026-02-15 22:14:03 +08:00

README.md

Aurora Logo

Aurora Rendering Engine

A.R.E. - A High-Performance Path Tracing Library in C++

English | 中文

License Version Issues

--- ## 📖 Overview **Aurora Rendering Engine (A.R.E.)** is a high-performance path tracing library developed in C++ by **NanoEra Studio**. Leveraging OpenGL 4.3 compute shaders for GPU-accelerated path tracing, A.R.E. provides a clean and intuitive API suitable for learning and researching ray tracing techniques. ## Features - 🚀 **GPU-Accelerated Path Tracing** - Powered by OpenGL 4.3 Compute Shaders - 🎨 **PBR Material System** - Diffuse, Metal, Dielectric materials - 💡 **Multiple Light Types** - Point lights, Area lights, Environmental lighting - 📦 **Static Library** - Easy integration into existing projects - 🔧 **CMake Build System** - Cross-platform support ## 🛠️ Dependencies A.R.E. depends on the following external libraries: - **OpenGL 4.3** - Graphics API - **GLFW** - Window and input management - **GLAD** - OpenGL loader - **GLM** - Mathematics library - **stb-image** - Image loading - **spdlog** - Logging system ## 📦 Quick Start ### Clone Repository ```bash git clone https://github.com/NanoEraStudio/AuroraRenderingEngine.git cd AuroraRenderingEngine ``` ### Build Project ```bash mkdir build && cd build cmake .. cmake --build . ``` ## 🎮 Minimal Example: Cornell Box The following code demonstrates how to render a classic Cornell Box scene using A.R.E.: ```cpp #include <core/renderer.h> #include <scene/scene.h> #include <scene/camera.h> #include <scene/mesh.h> #include <scene/material.h> #include <glad/glad.h> #include <GLFW/glfw3.h> using namespace are; int main() { // 1. Initialize window glfwInit(); GLFWwindow* window = glfwCreateWindow(800, 800, "Aurora - Cornell Box", nullptr, nullptr); glfwMakeContextCurrent(window); gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
// 2. Configure renderer
RendererConfig config;
config.width_ = 800;
config.height_ = 800;
config.samples_per_pixel_ = 1;
config.max_ray_depth_ = 4;

auto renderer = std::make_unique<Renderer>(config);
renderer->initialize();

// 3. Create scene
auto scene = std::make_unique<Scene>();

// Create materials
auto white_mat = std::make_shared<Material>();
white_mat->set_albedo(Vec3(0.73f, 0.73f, 0.73f));
white_mat->set_type(MaterialType::DIFFUSE);
uint white_id = scene->add_material(white_mat);

auto red_mat = std::make_shared<Material>();
red_mat->set_albedo(Vec3(0.65f, 0.05f, 0.05f));
red_mat->set_type(MaterialType::DIFFUSE);
uint red_id = scene->add_material(red_mat);

// Create floor mesh (example: a simple quad)
auto floor = std::make_shared<Mesh>();
std::vector<Vertex> vertices = {
    {{-2.0f, -2.0f, -2.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}},
    {{ 2.0f, -2.0f, -2.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 0.0f, 0.0f}},
    {{ 2.0f, -2.0f,  2.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}},
    {{-2.0f, -2.0f,  2.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}
};
std::vector<uint> indices = {0, 1, 2, 0, 2, 3};
floor->set_vertices(vertices);
floor->set_indices(indices);
floor->set_material(white_id);
floor->upload_to_gpu();
scene->add_mesh(floor);

// Setup camera
auto camera = std::make_shared<Camera>();
camera->set_position(Vec3(0.0f, 0.0f, 4.5f));
camera->set_target(Vec3(0.0f, 0.0f, 0.0f));
camera->set_perspective(45.0f, 1.0f, 0.1f, 100.0f);
scene->set_camera(camera);

// 4. Render loop
while (!glfwWindowShouldClose(window)) {
    renderer->render(*scene);
    glfwSwapBuffers(window);
    glfwPollEvents();
}

return 0;

}

## 📚 Documentation
For detailed documentation, visit: [A.R.E. Documentation](https://are.nanoera.top/docs)
## 🤝 Contributing
We welcome all forms of contributions! Please check [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
Thanks to all the developers and contributors of the dependency libraries.
---
<div align="center">
  <sub>Built with ❤️ by <a href="https://github.com/NanoEraStudio">NanoEra Studio</a></sub>
</div>