浏览代码

Add an option to disable bilateral filtering in SSS

/RenderPassXR_Sandbox
GitHub 8 年前
当前提交
088f3a4d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader

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


#pragma fragment Frag
#define SSS_PASS 1
#define SSS_BILATERAL 1
#define SSS_DEBUG 0
#define MILLIMETERS_PER_METER 1000

// Computes F(x)/P(x), s.t. x = sqrt(r^2 + t^2).
float3 ComputeBilateralWeight(float3 S, float r, float t, float rcpDistScale, float rcpPdf)
{
#if (SSS_BILATERAL == 0)
float t = 0;
#endif
// Reducing the integration distance is equivalent to stretching the integration axis.
float3 valX = KernelValCircle(sqrt(r * r + t * t) * rcpDistScale, S);

正在加载...
取消
保存