123456789101112131415 |
- export default /* glsl */`
- PhysicalMaterial material;
- material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
- material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );
- #ifdef STANDARD
- material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );
- #else
- material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );
- material.clearcoat = saturate( clearcoat ); // Burley clearcoat model
- material.clearcoatRoughness = clamp( clearcoatRoughness, 0.04, 1.0 );
- #endif
- #ifdef USE_SHEEN
- material.sheenColor = sheen;
- #endif
- `;
|