Skip to content

Commit

Permalink
Fix: webgl_renderer_pathtracer requiring lines (mrdoob#29987)
Browse files Browse the repository at this point in the history
* Added line material to path example

* Update webgl_renderer_pathtracer.html

Clean up.

---------

Co-authored-by: Michael Herzog <[email protected]>
  • Loading branch information
2 people authored and cmhhelgeson committed Dec 5, 2024
1 parent d26eafe commit 0d8b8fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/webgl_renderer_pathtracer.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
import { RGBELoader } from 'three/addons/loaders/RGBELoader.js';
import { LDrawLoader } from 'three/addons/loaders/LDrawLoader.js';
import { LDrawUtils } from 'three/addons/utils/LDrawUtils.js';

import { LDrawConditionalLineMaterial } from 'three/addons/materials/LDrawConditionalLineMaterial.js';
import { WebGLPathTracer, BlurredEnvMapGenerator, GradientEquirectTexture } from 'three-gpu-pathtracer';

let progressBarDiv, samplesEl;
Expand Down Expand Up @@ -156,6 +156,7 @@
// only smooth when not rendering with flat colors to improve processing time
const ldrawPromise =
new LDrawLoader()
.setConditionalLineMaterial( LDrawConditionalLineMaterial )
.setPath( 'models/ldraw/officialLibrary/' )
.loadAsync( 'models/7140-1-X-wingFighter.mpd_Packed.mpd', onProgress )
.then( function ( legoGroup ) {
Expand Down

0 comments on commit 0d8b8fe

Please sign in to comment.