# Schlick vis factor

This topic is 1223 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi,

Here the current vis factor I'm using based on an old discussion about PBR :

// [Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"].
float SchlickFunc( in float v, in float m )
{
float k = sqrt( ( 2.0f * m * m ) / 3.14159f );
return v / ( v - ( k * v ) + k );
}

// [Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"].
float G_Schlick( in float Roughness, in float NoV, in float NoL )
{
return SchlickFunc( NoL, Roughness ) * SchlickFunc( NoV, Roughness );
}

But I saw unreal uses :

// Tuned to match behavior of Vis_Smith
// [Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"]
float Vis_Schlick( float Roughness, float NoV, float NoL )
{
float k = Square( Roughness ) * 0.5;
float Vis_SchlickV = NoV * (1 - k) + k;
float Vis_SchlickL = NoL * (1 - k) + k;
return 0.25 / ( Vis_SchlickV * Vis_SchlickL );
}

Where comes from this calcule ? As you can see, the pi factor is not there, sqrt also.

Here the formula used by John Hable :

float G1V(float dotNV, float k)
{
return 1.0f/(dotNV*(1.0f-k)+k);
}

// V
float alpha = roughness*roughness;
float k = alpha/2.0f;
vis = G1V(dotNL,k)*G1V(dotNV,k);

Again, not the same formula and again pi and sqrt not there.

What is the explanation of all these different formula ? The unreal one is the most mysterious to me.

Thanks

--

The other factors used are common :

float3 Diffuse_Lambert( float3 DiffuseColor )
{
return DiffuseColor * (1 / PI);
}
// GGX / Trowbridge-Reitz
// [Walter et al. 2007, "Microfacet models for refraction through rough surfaces"]
float D_GGX( float Roughness, float NoH )
{
float m = Roughness * Roughness;
float m2 = m * m;
float d = ( NoH * m2 - NoH ) * NoH + 1; // 2 mad
return m2 / ( PI*d*d ); // 4 mul, 1 rcp
}
// [Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"]
// [Lagarde 2012, "Spherical Gaussian approximation for Blinn-Phong, Phong and Fresnel"]
float3 F_Schlick( float3 SpecularColor, float VoH )
{
// Anything less than 2% is physically impossible and is instead considered to be shadowing
float Fc = pow( 1 - VoH, 5 ); // 1 sub, 3 mul
return saturate( 50.0 * SpecularColor.g ) * Fc + (1 - Fc) * SpecularColor;
}
Edited by Alundra

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633661
• Total Posts
3013219
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!