Resolves sparkling artifacts that can arise under certain configurations when the sun is at the horizon and occluded by geometry very close to the viewpoint.
Rounding errors can cause the scattering value passed in by the final call to GetExtrapolatedSingleMieScattering made by GetSkyRadianceToPoint to have a very small negative r channel, which resulted in dramatically amplifying the returned value rather than clamping it to zero. By being slightly more tolerant in the existing sanity-check on the function, we can prevent this for free.
Hooray for renderdoc's shiny new shader debugging tools!
Resolves sparkling artifacts that can arise under certain configurations when the sun is at the horizon and occluded by geometry very close to the viewpoint.
Rounding errors can cause the
scattering
value passed in by the final call toGetExtrapolatedSingleMieScattering
made byGetSkyRadianceToPoint
to have a very small negativer
channel, which resulted in dramatically amplifying the returned value rather than clamping it to zero. By being slightly more tolerant in the existing sanity-check on the function, we can prevent this for free.Hooray for renderdoc's shiny new shader debugging tools!