|
@@ -37,6 +37,7 @@ vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {
|
|
// float fresnel = pow( 1.0 - dotLH, 5.0 );
|
|
// float fresnel = pow( 1.0 - dotLH, 5.0 );
|
|
|
|
|
|
// Optimized variant (presented by Epic at SIGGRAPH '13)
|
|
// Optimized variant (presented by Epic at SIGGRAPH '13)
|
|
|
|
+ // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
|
|
float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );
|
|
float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );
|
|
|
|
|
|
return ( 1.0 - specularColor ) * fresnel + specularColor;
|
|
return ( 1.0 - specularColor ) * fresnel + specularColor;
|