@google/model-viewer
Version:
Easily display interactive 3D models on the web and in AR!
37 lines (22 loc) • 1.11 kB
JavaScript
export const lightsChunk = /* glsl */ `
vec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
lightMapIrradiance *= PI; // factor of PI should not be present; included here to prevent breakage
irradiance += lightMapIrradiance;
irradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, maxMipLevel );
// (elalish) Changed the input from blinnShininessExponent to roughness, so that we can use the Trowbridge-Reitz distribution instead.
radiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry, material.specularRoughness, maxMipLevel );
clearCoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry, material.clearCoatRoughness, maxMipLevel );
`;
//# sourceMappingURL=lights_fragment_maps.glsl.js.map