(开发中) 基于OpenGL的路径追踪引擎,由C++实现
 
 
 
 
 
Go to file
ternaryop8479 6d9d95ddad feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪
### 纹理数组内容哈希缓存
- feat: 添加纹理配置哈希追踪,避免每帧重建纹理数组
- feat: 实现增量更新,只重建变化的纹理槽位
- fix: 消除 O(n²) 重复纹理线性搜索

### GGX 微表面 BRDF
- feat: 实现 GGX/Trowbridge-Reitz 法线分布函数
- feat: 添加 GGX 重要性采样替代简单扰动反射
- fix: 修复金属材质物理计算,提升收敛速度

### GBuffer 八面体法线编码
- feat: 法线从 RGBA32F 压缩到 RG32F,带宽减少 50%
- feat: 添加八面体编码/解码函数 (encoding.h)
- fix: 更新 GBuffer 着色器和绑定格式

### Sobol 低差异序列采样
- feat: 实现 8 维 Sobol 序列 + Owen 置乱
- feat: 收敛速度从 O(1/√n) 提升到 O(1/n)
- fix: 改进 PCG 种子策略,减少帧间相关性

### 降噪器时域累积
- feat: 添加历史帧纹理和 EMA 混合
- fix: 场景变化时自动重置历史
- fix: 显著减少闪烁,提升视觉稳定性
2026-04-04 22:21:42 +08:00
examples feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪 2026-04-04 22:21:42 +08:00
include feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪 2026-04-04 22:21:42 +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 feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪 2026-04-04 22:21:42 +08:00
shaders feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪 2026-04-04 22:21:42 +08:00
src feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪 2026-04-04 22:21:42 +08:00
.gitignore refactor:移除include/extended_folders.list,上传lib/stb中内容 2026-02-11 22:52:54 +08:00
AGENTS.md feat: 实现纹理缓存、GGX BRDF、Sobol采样、时域降噪 2026-04-04 22:21:42 +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排版,修改细节 2026-02-16 11:54:41 +08:00
README_zh.md docs: 修订README排版,修改细节 2026-02-16 11:54:41 +08:00
TODO-List refactor: 重构shaders目录结构,手动编写include处理逻辑 2026-03-28 10:10:11 +08:00

README.md

Aurora Logo

Aurora Rendering Engine

ARE - A High-Performance Path Tracing Library in C++

English | 中文

License Version Issues


Overview

Aurora Rendering Engine (ARE) is a high-performance path tracing library developed in C++ by NanoEra Studio.

Dependencies

  • OpenGL 4.3
  • GLFW
  • GLAD
  • GLM
  • stb-image
  • spdlog

Quick Start

Clone Repository

git clone https://github.com/NanoEra/aurora-rendering-engine.git
cd aurora-rendering-engine

Build Project

mkdir build && cd build
cmake ..
cmake --build .

Example

Here is a cornell box demo using ARE:

#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;
}

Built by NanoEra Studio