float squaredRoughness = saturate(roughness * roughness + min(2.0 * variance, threshold * threshold)); // threshold can be really low, square the value for easier control
publicstaticGUIContentsupportDBufferText=newGUIContent("Enable Decal","Allow to specify if the material can receive decal or not");
publicstaticGUIContentenableGeometricSpecularAAText=newGUIContent("Enable geometric specular AA","This reduce specular aliasing on highly dense mesh (Particularly useful when they don't use using normal map)");
publicstaticGUIContentspecularAAScreenSpaceVarianceText=newGUIContent("Screen space variance","Allow to control the strength of the specular AA reduction. Higher mean more blurry result and less aliasing");
publicstaticGUIContentspecularAAThresholdText=newGUIContent("Threshold","Allow to limit the effect of specular AA reduction. 0 mean don't apply reduction, higher value mean allow higher reduction");