A [Three.js](https://github.com/mrdoob/three.js/) renderer which utilizes path tracing to render a scene with true photorealism. The renderer supports global illumination, reflections, soft shadows, and realistic environment lighting.
npm install ray-tracing-rendererDemo | User Guide | API Reference | Contributing
RayTracingRenderer is the early alpha stage of development. Features are incomplete and subject to change, and the renderer is unstable on certain hardware.
* Latest ES6 Build
* Latest ES5 Build
Or if you use npm, runnpm install ray-tracing-renderer
Ray Tracing Renderer relies on WebGL2, and any browser supporting WebGL2 also supports ES6. Thus, you should only use the ES5 build if the renderer inside your appliaction is optional, and your application must support older browsers.
javascript
`You can then use the renderer in your app.
`javascript
const renderer = new THREE.RayTracingRenderer();
`
#### As a module
If you installed via npm, simply import the renderer as follows.
`javascript
import { RayTracingRenderer } from 'ray-tracing-renderer'
`
Or if you downloaded the renderer as a file,
`javascript
import { RayTracingRenderer } from './RayTracingRenderer.js'
`
The renderer can then be used in your app.
`javascript
const renderer = new RayTracingRenderer();
``
(Click to run example)
Ray Tracing Renderer runs on WebGL2, and does so by implementing a path tracing algorithm inside a shader. It supports arbitrary Three.js scenes, with some restrictions.
For a more detailed guide on how to use the renderer, please read the User Guide .
Take a look to this page with more details about submitting changes to the project.
This repository started as a side-project and the time we invest on it is limited. It may take us a few days to get back to you but please bring your ideas forward. We'll do our best to respond promptly.