Skip to content

Commit

Permalink
Rename MeshSSSPhysicalNodeMaterial -> MeshSSSNodeMaterial (mrdoob#27506)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag authored and AdaRoseCannon committed Jan 15, 2024
1 parent a2eb174 commit ed0b58a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/jsm/nodes/materials/Materials.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export { default as MeshLambertNodeMaterial } from './MeshLambertNodeMaterial.js
export { default as MeshPhongNodeMaterial } from './MeshPhongNodeMaterial.js';
export { default as MeshStandardNodeMaterial } from './MeshStandardNodeMaterial.js';
export { default as MeshPhysicalNodeMaterial } from './MeshPhysicalNodeMaterial.js';
export { default as MeshSSSPhysicalNodeMaterial } from './MeshSSSPhysicalNodeMaterial.js';
export { default as MeshSSSNodeMaterial } from './MeshSSSNodeMaterial.js';
export { default as PointsNodeMaterial } from './PointsNodeMaterial.js';
export { default as SpriteNodeMaterial } from './SpriteNodeMaterial.js';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PhysicalLightingModel from '../functions/PhysicalLightingModel.js';
import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial.js';
import { float, vec3 } from '../shadernode/ShaderNode.js';

class SSSPhysicalLightingModel extends PhysicalLightingModel {
class SSSLightingModel extends PhysicalLightingModel {

constructor( useClearcoat, useSheen, useIridescence, useSSS ) {

Expand Down Expand Up @@ -37,7 +37,7 @@ class SSSPhysicalLightingModel extends PhysicalLightingModel {

}

class MeshSSSPhysicalNodeMaterial extends MeshPhysicalNodeMaterial {
class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {

constructor( parameters ) {

Expand All @@ -60,7 +60,7 @@ class MeshSSSPhysicalNodeMaterial extends MeshPhysicalNodeMaterial {

setupLightingModel( /*builder*/ ) {

return new SSSPhysicalLightingModel( this.useClearcoat, this.useSheen, this.useIridescence, this.useSSS );
return new SSSLightingModel( this.useClearcoat, this.useSheen, this.useIridescence, this.useSSS );

}

Expand All @@ -79,6 +79,6 @@ class MeshSSSPhysicalNodeMaterial extends MeshPhysicalNodeMaterial {

}

export default MeshSSSPhysicalNodeMaterial;
export default MeshSSSNodeMaterial;

addNodeMaterial( 'MeshSSSPhysicalNodeMaterial', MeshSSSPhysicalNodeMaterial );
addNodeMaterial( 'MeshSSSNodeMaterial', MeshSSSNodeMaterial );
2 changes: 1 addition & 1 deletion examples/webgpu_materials_sss.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
const thicknessTexture = loader.load( 'models/fbx/bunny_thickness.jpg' );
imgTexture.wrapS = imgTexture.wrapT = THREE.RepeatWrapping;

const material = new Nodes.MeshSSSPhysicalNodeMaterial();
const material = new Nodes.MeshSSSNodeMaterial();
material.color = new THREE.Color( 1.0, 0.2, 0.2 );
material.roughness = 0.3;
material.thicknessColorNode = Nodes.texture( thicknessTexture ).mul( Nodes.vec3( 0.5, 0.3, 0.0 ) );
Expand Down

0 comments on commit ed0b58a

Please sign in to comment.