You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
367 B
JavaScript

2 years ago
import DFGApprox from './DFGApprox.js';
import { tslFn } from '../../shadernode/ShaderNode.js';
const EnvironmentBRDF = tslFn( ( inputs ) => {
const { dotNV, specularColor, specularF90, roughness } = inputs;
const fab = DFGApprox( { dotNV, roughness } );
return specularColor.mul( fab.x ).add( specularF90.mul( fab.y ) );
} );
export default EnvironmentBRDF;