浏览代码

Revert the 'disctScale' test change

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

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


float2 centerPosition = posInput.unPositionSS;
float3 centerIrradiance = LOAD_TEXTURE2D(_IrradianceSource, centerPosition).rgb;
float maxDistInPixels = maxDistance * min(FLT_MAX, max(scaledPixPerMm.x, scaledPixPerMm.y));
float maxDistInPixels = maxDistance * max(scaledPixPerMm.x, scaledPixPerMm.y);
if (maxDistInPixels < 1)
if (distScale == 0 || maxDistInPixels < 1)
{
#if SSS_DEBUG
return float4(0, 0, 1, 1);

// We perform point sampling. Therefore, we can avoid the cost
// of filtering if we stay within the bounds of the current pixel.
// We use the value of 1 instead of 0.5 as an optimization.
float maxDistInPixels = scaledStepSize * min(FLT_MAX, maxDistance);
float maxDistInPixels = scaledStepSize * maxDistance;
if (maxDistInPixels < 1)
if (distScale == 0 || maxDistInPixels < 1)
{
return float4(bsdfData.diffuseColor * sampleIrradiance, 1);
}

// We do not terminate the loop since we want to gather the contribution
// of the remaining samples (e.g. in case of hair covering skin).
}
}
#endif

正在加载...
取消
保存