UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

3 lines (2 loc) 602 B
declare const _default: "\n\nvec3 getSpecularModulate(in vec3 specularity, in vec3 albedo, in float metalness, in float f0, in float specularityFactor) {\n // Apply specularityFactor to dielectric F0 only. For metals (metalness=1), F0 is the albedo\n // and should not be affected by specularityFactor per the KHR_materials_specular glTF spec.\n vec3 dielectricF0 = f0 * specularity * specularityFactor;\n return mix(dielectricF0, albedo, metalness);\n}\n\nvec3 getAlbedoModulate(in vec3 albedo, in float metalness) {\n return albedo * (1.0 - metalness);\n}\n"; export default _default;