Path tracing SSS Albedo Remapping — Unconditional G Correction Possible Bug

#if SSS_USE_TIR
	float3 Albedo = 1 - exp(SSS.Color * (-11.43 + SSS.Color * (15.38 - 13.91 * SSS.Color)));
#else
	// Van de-Hulst inverse mapping
	// https://blog.selfshadow.com/publications/s2017-shading-course/imageworks/s2017_pbs_imageworks_slides_v2.pdf (Slide 44)
	// http://www.eugenedeon.com/project/a-hitchhikers-guide-to-multiple-scattering/ (Section 7.5.3 of v0.1.3)
	float3 Albedo = 1 - Pow2(4.09712 + 4.20863 * SSS.Color - sqrt(9.59217 + SSS.Color * (41.6808 + 17.7126 * SSS.Color)));
	SSS.Radius *= 2.0; // roughly match parameterization above
#endif

	// Subsurface guiding is implemented following the Dwivedi random walk technique described here:
	// https://cgg.mff.cuni.cz/~jaroslav/papers/2014-zerovar/
	// http://www.eugenedeon.com/project/zerovar2020/
	// A thin-slab approximation is used to improve the guiding in thin regions as well as described in the video presentation (slides 37-39).
#define SSS_USE_DWIVEDI 1
#define SSS_USE_DWIVEDI_USE_THIN_SLABS 1 // Probe the geometry to have an estimate of thickness - and use this to guide toward front or backside, depending on which is closer

	// Revisiting Physically Based Shading at Imageworks.
	// https://blog.selfshadow.com/publications/s2017-shading-course/imageworks/s2017_pbs_imageworks_slides_v2.pdf
	float G = SSS.G;
	Albedo = Albedo / (1 - G * (1 - Albedo));

The question: Is the unconditional G correction intentionally applied to the TIR path as well, or is this a bug? Applying the Imageworks anisotropy correction on top of the Disney/Hyperion fit seems incorrect since the two models have different derivations and assumptions.

Not sure if the issues we are seeing with SSS and path tracer are related to this but there are defiantly major issues with current versions of the engine. I have been applying various path tracer specific shader hacks to the subsurface color channel in our two sided foliage shader for a while but 5.6 and 5.7 have been unsalvageable using that approach.

  1. Lumen
  2. Path tracer with ray trace fallback set to 0 error
  3. Path tracer with r.RayTracing.Nanite.Mode 1
  4. Path tracer with r.RayTracing.Nanite.Mode 1 and r.PathTracing.MISMode 1

This issue and the memory allocation bug that has been reported associated with r.RayTracing.Nanite.Mode 1 has had us stuck on 5.5 for ages. We could really use the new voxel nanite mode in our current projects because we tend to have a lot of plantings in our jobs. Would love to see this stuff fixed for 5.8.