float squaredRoughness = saturate(roughness * roughness + min(2.0 * variance, threshold * threshold)); // threshold can be really low, square the value for easier control
float squaredRoughness = saturate(roughness * roughness + min(2.0 * variance, threshold * threshold)); // threshold can be really low, square the value for easier control
EnableDualSpecularLobe=newProperty(this,k_EnableDualSpecularLobe,"Enable Dual Specular Lobe","Enable a second specular lobe, aim to simulate a mix of a narrow and a haze lobe that better match measured material",true);
EnableIridescence=newProperty(this,k_EnableIridescence,"Enable Iridescence","Enable physically based iridescence layer",true);
newProperty(this,"_SpecularAntiAliasingScreenSpaceVariance","Screen Space Variance","Screen Space Variance (should be less than 0.25)",false,_=>EnableSpecularAA.BoolValue==true),
newProperty(this,"_NormalCurvatureToRoughnessScale","Normal Curvature To Roughness Scale","Normal Curvature To Roughness Scale",false,_=>EnableNormalCurvatureToRoughness.BoolValue==true),
newProperty(this,"_NormalCurvatureToRoughnessBias","Normal Curvature To Roughness Bias","Normal Curvature To Roughness Bias",false,_=>EnableNormalCurvatureToRoughness.BoolValue==true),
newProperty(this,"_NormalCurvatureToRoughnessExponent","Normal Curvature To Roughness Exponent","Normal Curvature To Roughness Exponent",false,_=>EnableNormalCurvatureToRoughness.BoolValue==true),