# three-gpu-pathtracer/r3f: Functions

## Functions

### usePathTracer

```js
usePathTracer(  ): WebGPUPathTracerImpl | null
```

Returns the path tracer of the nearest parent WebGPUPathTracer component, an instance of the
WebGPUPathTracer class from "three-gpu-pathtracer/webgpu", or null if there is none. Use it to
notify the path tracer of scene changes with `setScene`, `updateMaterials`, `updateTransforms`,
`updateLights`, `updateEnvironment`, or `reset`.
