   return (1. / max((1. + v + l ),0.000001));
 }
 
-// spectre G
-float SmithVisibilityG1_TrowbridgeReitzGGX(float NdotV, float alphaG){
+float SmithVisibilityG1_var2(float NdotV, float r){
 	float tanSquared = (1.0 - NdotV * NdotV) / max((NdotV * NdotV),0.00001);
-
-	return 2.0 / (1.0 + sqrt(1.0 + alphaG * alphaG * tanSquared));
-}
-
-float SmithVisibilityG_TrowbridgeReitzGGX_Walter(PBRInfo pbrInputs){
-	return SmithVisibilityG1_TrowbridgeReitzGGX(pbrInputs.NdotL, pbrInputs.roughness) * SmithVisibilityG1_TrowbridgeReitzGGX(pbrInputs.NdotV, pbrInputs.roughness);
-}
-
-// D
+	return 2.0 / (1.0 + sqrt(1.0 + r * r * tanSquared));
+}
+
+float SmithG1(float NdotV, float r) {
+  return 2.0 * NdotV / (NdotV + sqrt(r*r+(1.0-r*r)*(NdotV*NdotV)));
+}
+
+
+float SmithVisibilityGGX(PBRInfo pbrInputs){
+	return SmithVisibilityG1_var2(pbrInputs.NdotL, pbrInputs.roughness) * SmithVisibilityG1_var2(pbrInputs.NdotV, pbrInputs.roughness);
+}
+
+// D  (spectre uses this)
 float GGX(PBRInfo pbrInputs)
 {
   float roughnessSq = pbrInputs.roughness*pbrInputs.roughness;
   float f = (pbrInputs.NdotH * roughnessSq - pbrInputs.NdotH) * pbrInputs.NdotH + 1.0;
   return roughnessSq / (M_PI * f * f);
-}
-
-// spectre D
-float NormalDistributionFunction_TrowbridgeReitzGGX(PBRInfo pbrInputs){
-  float a = pbrInputs.roughness;
-	float a2 = a * a;
-	float d = pbrInputs.NdotH * pbrInputs.NdotH * (a2 - 1.0) + 1.0;
-
-	return a2 / (M_PI * d * d);
 }
 
 

float microfacetSchlick(PBRInfo pbrInputs)
{
  float k = pbrInputs.roughness * 0.79788; // 0.79788 = sqrt(2.0/3.1415);

  float l = pbrInputs.LdotH / (pbrInputs.LdotH * (1.0 - k) + k);
  float n = pbrInputs.NdotH / (pbrInputs.NdotH * (1.0 - k) + k);
  return l * n;
}

float microfacetSmithGGX(PBRInfo pbrInputs)
{
  float NdotL2 = pbrInputs.NdotL * pbrInputs.NdotL;
  float NdotV2 = pbrInputs.NdotV * pbrInputs.NdotV;

}

// F
// r
vec3 fresnelSchlick2(PBRInfo pbrInputs)
{
	return pbrInputs.reflectance0 + (pbrInputs.reflectance90 - pbrInputs.reflectance0) * pow(clamp(1.0 - pbrInputs.VdotH, 0.0, 1.0), 5.0);
}

vec3 fresnelSchlick(PBRInfo pbrInputs)
