AreaLightTest.AreaLightForm.GSmith C# (CSharp) Метод

GSmith() приватный Метод

private GSmith ( double Roughness, double ndotv, double ndotl ) : double
Roughness double
ndotv double
ndotl double
Результат double
		double	GSmith( double Roughness, double ndotv, double ndotl )
		{
//			double	m2   = Roughness * Roughness;
			double	m2   = (Roughness + 1)*(Roughness + 1) / 8.0;
			double	visV = ndotv + Math.Sqrt( ndotv * ( ndotv - ndotv * m2 ) + m2 );
			double	visL = ndotl + Math.Sqrt( ndotl * ( ndotl - ndotl * m2 ) + m2 );

			return 1.0f / ( visV * visL );
		}