gkjohnson / three-gpu-pathtracer

Path tracing renderer and utilities for three.js built on top of three-mesh-bvh.
https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/index.html
MIT License
1.34k stars 133 forks source link

Add utility function for converting material + surface hit to surface record #557

Open gkjohnson opened 6 months ago

gkjohnson commented 6 months ago

Encapsulate the texture sampling logic and reuse in the "attenuate hit" function