浏览代码

Add a comment

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

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


float2 vec = r * float2(cos(phi), sin(phi)); \
\
float2 position = centerPosUnSS + vec * scaledPixPerMm; \
float rcpPdf = kernel[profileID][i][1]; \
float3 irradiance = LOAD_TEXTURE2D(_IrradianceSource, position).rgb; \
\
/* TODO: see if making this a [branch] improves performance. */ \

float z = LOAD_TEXTURE2D(_MainDepthTexture, position).r; \
float d = LinearEyeDepth(z, _ZBufferParams); \
float t = millimPerUnit * d - (millimPerUnit * centerDepthVS); \
float3 w = ComputeBilateralWeight(shapeParam, r, t, rcpDistScale, rcpPdf); \
float p = kernel[profileID][i][1]; \
float3 w = ComputeBilateralWeight(shapeParam, r, t, rcpDistScale, p); \
\
totalIrradiance += w * irradiance; \
totalWeight += w; \

float2 scaledPixPerMm = distScale * rcp(millimPerUnit * unitsPerPixel);
// Take the first (central) sample.
// TODO: copy its neighborhood into LDS.
float2 centerPosition = posInput.unPositionSS;
float3 centerIrradiance = LOAD_TEXTURE2D(_IrradianceSource, centerPosition).rgb;

正在加载...
取消
保存