// We use the Disney transmission code with the parameters of Jimenez in order not to add an extra shader variant.
// We are currently supporting two different SSS mode: Jimenez (with 2-Gaussian profile) and Disney
// We have added the ability to switch between each other for subsurface scattering, but for transmittance this is more tricky as we need to add
// shader variant for forward, gbuffer and deferred shader. We want to avoid this.
// So for transmittance we use Disney profile formulation (that we know is more correct) in both case, and in the case of Jimenez we hack the parameters with 2-Gaussian parameters (Ideally we should fit but haven't find good fit) so it approximately match.
// Note: Jimenez SSS is in cm unit whereas Disney is in mm unit making an inconsistency here to compare model side by side
// SSSSS algorithm need to know which pixels contribute to SSS and which doesn't. We could use the stencil for that but it mean that it will increase the cost of SSSSS
// A simpler solution is to add a slight contribution here that isn't visible (here we chose fp16 min (which is also fp11 and fp10 min).
// The SSSSS algorithm will check if diffuse lighting is black and discard the pixel if it is the case
publicstaticGUIContentsubsurfaceProfileText=newGUIContent("Subsurface profile","A profile determines the shape of the blur filter.");
publicstaticGUIContentsubsurfaceRadiusText=newGUIContent("Subsurface radius","Determines the range of the blur.");
publicstaticGUIContentsubsurfaceRadiusMapText=newGUIContent("Subsurface radius map","Determines the range of the blur.");
publicstaticGUIContentsubsurfaceRadiusMapText=newGUIContent("Subsurface radius map (R)","Determines the range of the blur.");
publicstaticGUIContentthicknessMapText=newGUIContent("Thickness map","If subsurface scattering is enabled, low values allow some light to be transmitted through the object.");
publicstaticGUIContentthicknessMapText=newGUIContent("Thickness map (R)","If subsurface scattering is enabled, low values allow some light to be transmitted through the object.");
// Specular color
publicstaticGUIContentspecularColorText=newGUIContent("Specular Color","Specular color (RGB)");
// Ideally we want an approximation of gamma curve 2.0 to save ALU on GPU but as off now it won't match the GammaToLinear conversion of props in engine