|
@@ -3,6 +3,7 @@ import { transformedClearcoatNormalView } from '../accessors/NormalNode.js';
|
|
|
import { clearcoat, clearcoatRoughness, sheen, sheenRoughness, iridescence, iridescenceIOR, iridescenceThickness, specularColor, specularF90, diffuseColor, metalness, roughness, anisotropy, alphaT, anisotropyT, anisotropyB, ior, transmission, thickness, attenuationDistance, attenuationColor, dispersion } from '../core/PropertyNode.js';
|
|
|
import { materialClearcoat, materialClearcoatRoughness, materialClearcoatNormal, materialSheen, materialSheenRoughness, materialIridescence, materialIridescenceIOR, materialIridescenceThickness, materialSpecularIntensity, materialSpecularColor, materialAnisotropy, materialIOR, materialTransmission, materialThickness, materialAttenuationDistance, materialAttenuationColor, materialDispersion } from '../accessors/MaterialNode.js';
|
|
|
import { float, vec2, vec3, If } from '../shadernode/ShaderNode.js';
|
|
|
+import getRoughness from '../functions/material/getRoughness.js';
|
|
|
import { TBNViewMatrix } from '../accessors/AccessorsUtils.js';
|
|
|
import PhysicalLightingModel from '../functions/PhysicalLightingModel.js';
|
|
|
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
|
|
@@ -112,7 +113,7 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
const clearcoatRoughnessNode = this.clearcoatRoughnessNode ? float( this.clearcoatRoughnessNode ) : materialClearcoatRoughness;
|
|
|
|
|
|
clearcoat.assign( clearcoatNode );
|
|
|
- clearcoatRoughness.assign( clearcoatRoughnessNode );
|
|
|
+ clearcoatRoughness.assign( getRoughness( { roughness: clearcoatRoughnessNode } ) );
|
|
|
|
|
|
}
|
|
|
|