This project is a high-performance web-based rendering engine implemented using WebGL 2.0. It features a Physically Based Rendering (PBR) pipeline with support for both standard path tracing and advanced transient rendering, allowing for the visualization of light propagation over time.
The core functionality of the project relies on the following libraries:
- Svelte 5 & Vite: Frontend framework and build tool for the user interface and development environment.
- Three.js: Used for utility functions, math operations, and as a foundation for complex geometry loaders (OBJ, GLTF).
- math.gl: High-performance math library for vector and matrix operations.
- GLSL (WebGL 2.0): The core rendering logic is implemented in fragment shaders for GPU-accelerated computing.
- Jimp: Used for image processing and texture preparation on the CPU.
To run the project locally, ensure you have Node.js installed on your system. Follow these steps:
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Build for production:
npm run build
Once the development server is running, the application will be accessible at http://localhost:5173.
The engine allows for complex scene configurations, including geometry, materials, and lighting. Scene definitions are managed within src/lib/scene.ts.
To modify a scene or create a new one:
- Define Materials: Use the
Materialclass to specify albedo, roughness, metalness, and emission properties. - Add Geometry: Utilize methods like
addSphere,addPlane, oraddGLTFModelto populate the 3D environment. - Configure Lighting: Add point lights via
PointLightor create area lights by assigning emissive materials to geometric primitives. - Set Initial Parameters: Adjust camera position, FOV, and rendering settings (such as sample count or transient ranges) in the
initialParamsobject.
- Víctor Orrios Barón
- José Miguel Quílez Vergara
This work is licensed under a Creative Commons Attribution 4.0 International License.
Individual components and libraries integrated into this project remain under their respective original licenses.