浏览代码

Add the bilateral toggle support for the basic SSS model

/RenderPassXR_Sandbox
Evgenii Golubev 8 年前
当前提交
9a651afa
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader

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


[flatten]
if (any(sampleIrradiance))
{
#if (SSS_BILATERAL != 0)
// Apply bilateral weighting.
// Ref #1: Skin Rendering by Pseudo–Separable Cross Bilateral Filtering.
// Ref #2: Separable SSS, Supplementary Materials, Section E.

sampleWeight *= exp(-zDistance * zDistance * halfRcpVariance);
#endif
totalIrradiance += sampleWeight * sampleIrradiance;
totalWeight += sampleWeight;

正在加载...
取消
保存