浏览代码

Remove incorrect PDF rescaling from the SSS code

/RenderPassXR_Sandbox
GitHub 8 年前
当前提交
3542318a
共有 1 个文件被更改,包括 3 次插入7 次删除
  1. 10
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader

10
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader


t = 0;
#endif
// Reducing the integration distance is equivalent to stretching the integration axis.
float3 valX = KernelValCircle(sqrt(r * r + t * t) * rcpDistScale, S);
// The reciprocal of the PDF could be reinterpreted as a 'dx' term in Int{F(x)dx}.
// As we shift the location of the value on the curve during integration,
// the length of the segment 'dx' under the curve changes approximately linearly.
float rcpPdfX = rcpPdf * (1 + abs(t) / r);
float3 val = KernelValCircle(sqrt(r * r + t * t) * rcpDistScale, S);
return valX * rcpPdfX;
// Rescaling of the PDF is handled via 'totalWeight'.
return val * rcpPdf;
}
#define SSS_ITER(i, n, kernel, profileID, shapeParam, centerPosUnSS, centerDepthVS, \

正在加载...
取消
保存