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.27k stars 125 forks source link

StaticGeometryGenerator: Ensure geometries are updated #647

Closed gkjohnson closed 3 weeks ago

gkjohnson commented 3 weeks ago

Fix #646

Fixes cases where replacing the geometry causes errors on scene update or no change:

cc @ycw @dongho-shin would it be possible to test this to make sure it addresses the problems from #646?

ycw commented 3 weeks ago

would it be possible to test this

Yes, simply updates the package(in importmap) from NPM registry to this PR:

- "three-gpu-pathtracer": "https://esm.sh/three-gpu-pathtracer@0.0.22?external=three",
+ "three-gpu-pathtracer": "https://esm.sh/gh/gkjohnson/three-gpu-pathtracer@fix-geometry-update?external=three",

Result: https://jsfiddle.net/tq7gxfsb/

https://github.com/gkjohnson/three-gpu-pathtracer/assets/1063018/bb69f7d4-2a15-4619-9b59-7ad1755254f0

gkjohnson commented 3 weeks ago

Great, thanks for testing! I'll make a new release later this week or so.

ycw commented 3 weeks ago

Thanks.