F_Schlick top-level property

dynamic F_Schlick
getter/setter pair

Implementation

var F_Schlick = ShaderNode((inputs) {
  var f0 = inputs.f0;
  var f90 = inputs.f90;
  var dotVH = inputs.dotVH;

  // Original approximation by Christophe Schlick '94
  // float fresnel = pow( 1.0 - dotVH, 5.0 );

  // Optimized variant (presented by Epic at SIGGRAPH '13)
  // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
  var fresnel = exp2(mul(sub(mul(-5.55473, dotVH), 6.98316), dotVH));

  return add(mul(f0, sub(1.0, fresnel)), mul(f90, fresnel));
});