AuraRay is a compact XR rendering study that combines a C++17 offline ray tracer with a reusable Unity foveation toolkit. It is designed for graphics and XR learners, recruiters evaluating rendering work, and developers exploring gaze-aware quality allocation. The project demonstrates deterministic ray tracing, render metadata, simulated foveated sampling, and an interactive gaze-controlled visualization relevant to XR prototyping, optics demos, rendering-budget education, and future eye-tracking experiments.
The Unity sample turns gaze-aware quality allocation into an interactive simulator with a moving target, live statistics, and four visualization modes.
The offline C++ renderer compares full, low, and gaze-aware sampling on the same scene using deterministic output.
- A dependency-free C++17 sphere ray tracer with camera rays and anti-aliasing.
- Lambertian, metal, and dielectric materials with deterministic scene presets.
- PPM reference output, PNG portfolio export, and JSON render metadata.
- Full-quality, low-quality, gaze-aware, and overlay render modes.
- A reusable Unity package with configurable gaze, foveation regions, modes, and statistics.
- An importable Unity sample using only built-in primitives and UGUI.
- Makefile and CMake build workflows.
C++ offline renderer
|
v
PPM / PNG / JSON outputs
|
v
Unity package: com.auraray.foveation
|
v
Interactive foveation simulator
The C++ renderer remains an offline reference implementation. Unity consumes the concepts and reference artifacts but does not call native C++ code. See docs/architecture.md for component responsibilities.
Requirements: a C++17 compiler and Make.
make runOn macOS, export all tracked portfolio PNGs with:
make pngPNG conversion uses the built-in macOS sips tool. The renderer itself always writes portable PPM output and does not depend on sips.
Requirements: CMake 3.20 or newer and a C++17 compiler.
cmake -S . -B build/cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build/cmake
./build/cmake/aurarayEquivalent convenience targets are available through make cmake-configure, make cmake-build, and make cmake-run. Run the executable from the repository root so it writes to renders/.
The embedded package is located at unity/AuraRayViewer/Packages/com.auraray.foveation.
- Open
unity/AuraRayViewerin Unity 6000.3.17f1 or newer. - Open Window > Package Management > Package Manager.
- Select AuraRay Foveation Toolkit.
- Import Interactive Foveation Demo.
- Open the imported
AuraRayViewer.unityscene and enter Play Mode.
To install it in another local Unity project, choose Add package from disk and select unity/AuraRayViewer/Packages/com.auraray.foveation/package.json.
- Move gaze:
WASDor arrow keys - Place gaze: left mouse click
- Change mode:
1through4, or the on-screen buttons
The package was clean-installed into a fresh Unity 6000.3.17f1 project. Its UGUI dependency and assemblies resolved, and the sample imported and opened with zero missing scripts.
These sphere-only scenes keep the implementation focused while giving AuraRay a visual identity beyond the tutorial baseline.
| Minimal ray tracer | XR lens demo | Glass orbs | Warm studio |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- macOS on Apple silicon
- Apple Clang 17 with C++17
- CMake 4.3.4 using a project minimum of 3.20
- Unity 6000.3.17f1
- Unity package clean-install test in a fresh project
The CMake target includes MSVC-compatible warning flags, but Windows and Linux builds have not yet been verified for v0.1.0.
- Foveation is simulated; it does not reduce Unity rendering workload.
- Gaze is controlled by keyboard or mouse, not real eye-tracking hardware.
- The C++ renderer is offline and is not connected to Unity through a native plugin.
- Geometry is intentionally limited to spheres, and there is no BVH or texture system.
make pnguses macOSsips; other platforms can view PPM files or use their preferred image converter.
- Create and publish the
v0.1.0GitHub tag and release.
- Add focused Unity EditMode tests and lightweight CI.
- Consider a replaceable gaze-provider interface when a second input source exists.
- Explore optional OpenXR eye-gaze input.
- Evaluate native C++ integration only after the offline and Unity APIs are stable.
AuraRay is available under the MIT License.






