Ray Tracing (Path Tracing) in Fragment Shader using React Three Fiber, utilizing ShaderMaterial from Three.js.
Based on Ray Tracing in One Weekend
- Next.js
- Three.js
- React Three Fiber
$ npm i
$ run npm dev
- Mouse Wheel : Change the vertical field of view
- Drag : Change the horizontal position of camera
- Key 'W' and 'S' : Change the focal length
The shader files are in /shaders
.