浏览代码

Forgot to offset PCSS shadow sample for block search

/main
Antoine Lelievre 7 年前
当前提交
2bdf7f27
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/Shadow/PCSS.hlsl

2
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/Shadow/PCSS.hlsl


real2 offset = real2(poissonDisk64[i].x * sampleJitter.y + poissonDisk64[i].y * sampleJitter.x,
poissonDisk64[i].x * -sampleJitter.x + poissonDisk64[i].y * sampleJitter.y) * lightArea;
real shadowMapDepth = SampleShadow_T2DA(shadowContext, texIdx, sampIdx, coord.xy, slice).x;
real shadowMapDepth = SampleShadow_T2DA(shadowContext, texIdx, sampIdx, coord.xy + offset, slice).x;
if (COMPARE_DEVICE_DEPTH_CLOSER(shadowMapDepth, coord.z + dot(sampleBias, offset)))
{

正在加载...
取消
保存