Skip to content

Commit

Permalink
Revert "Examples: Simplified webgl_nodes_loader_gltf_sheen."
Browse files Browse the repository at this point in the history
This reverts commit ddaf9ea.
  • Loading branch information
mrdoob committed Feb 1, 2023
1 parent f794c45 commit 3f0b691
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file modified examples/screenshots/webgl_nodes_loader_gltf_sheen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions examples/webgl_nodes_loader_gltf_sheen.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@

scene.add( gltf.scene );

const object = gltf.scene.getObjectByName( 'SheenChair_fabric' );

// Convert to NodeMaterial
const material = NodeMaterial.fromMaterial( object.material );

const checkerNode = checker( mul( uv(), 5 ) );

material.sheenNode = mix( color( 0x00ffff ), color( 0xffff00 ), checkerNode );
material.sheenRoughnessNode = checkerNode;

object.material = material;

} );

renderer = new THREE.WebGLRenderer( { antialias: true } );
Expand Down

0 comments on commit 3f0b691

Please sign in to comment.