浏览代码

Add half-texel offset

/RenderPassXR_Sandbox
Evgenii Golubev 7 年前
当前提交
dd5224b6
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute


#endif
}
void EvaluateSample(uint i, uint n, uint profileID, uint iR, uint iP, uint2 pixelCoord, int2 cacheAnchor,
void EvaluateSample(uint i, uint n, uint profileID, uint iR, uint iP, float2 centerCoord, int2 cacheAnchor,
float3 shapeParam, float3 centerPosVS, float mmPerUnit, float2 pixelsPerMm,
bool useTangentPlane, float3 tangentX, float3 tangentY, float4x4 projMatrix,
inout float3 totalIrradiance, inout float3 totalWeight)

}
else
{
position = (int2)(pixelCoord + vec * pixelsPerMm);
position = (int2)(centerCoord + vec * pixelsPerMm);
xy2 = r * r;
}

for (i = 1, n = SSS_N_SAMPLES_FAR_FIELD; i < n; i++)
{
// Integrate over the image or tangent plane in the view space.
EvaluateSample(i, n, profileID, iR, iP, pixelCoord, cacheAnchor,
EvaluateSample(i, n, profileID, iR, iP, pixelCoord + 0.5, cacheAnchor,
shapeParam, centerPosVS, mmPerUnit, pixelsPerMm,
useTangentPlane, tangentX, tangentY, projMatrix,
totalIrradiance, totalWeight);

for (i = SSS_N_SAMPLES_FAR_FIELD, n = SSS_N_SAMPLES_NEAR_FIELD; i < n; i++)
{
// Integrate over the image or tangent plane in the view space.
EvaluateSample(i, n, profileID, iR, iP, pixelCoord, cacheAnchor,
EvaluateSample(i, n, profileID, iR, iP, pixelCoord + 0.5, cacheAnchor,
shapeParam, centerPosVS, mmPerUnit, pixelsPerMm,
useTangentPlane, tangentX, tangentY, projMatrix,
totalIrradiance, totalWeight);

正在加载...
取消
保存