But with no luck. As you can see, the light only appears when you move the OrbitControls within the codesanbox, since that shows the normal render of the scene. When the pathtracing render is enabled (when you do not move the OrbitControls for half a second), the light dissapears. I want the light to also be visible whenever pathtracing is enabled, as in this example from the original pathtracing library, on vanilla Three.js.
https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/spotLights.html
I'm trying to figure out how to insert lights within a pathtracing generated scene. Link to the relevant codesanbox:
https://codesandbox.io/s/react-three-gpu-pathtracer-forked-g2l8l2?file=/src/App.js
In this example, I added a red RectAreaLight within lines 116-131. I copied the methods that were mentioned on one of the repo issues: https://github.com/pmndrs/react-three-gpu-pathtracer/issues/4 https://codesandbox.io/s/react-three-gpu-pathttracer-gltf-lights-3t7bqu?file=/src/App.js
But with no luck. As you can see, the light only appears when you move the OrbitControls within the codesanbox, since that shows the normal render of the scene. When the pathtracing render is enabled (when you do not move the OrbitControls for half a second), the light dissapears. I want the light to also be visible whenever pathtracing is enabled, as in this example from the original pathtracing library, on vanilla Three.js. https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/spotLights.html
Here, the light is visible on both modes.