浏览代码

Fixed light leak bias for moment calculations.

/RenderPassXR_Sandbox
uygar 7 年前
当前提交
31d02d2f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowMoments.hlsl

2
Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowMoments.hlsl


float mD = depth - moments.x;
float p = variance / (variance + mD * mD);
p = saturate( p / (1.0f - lightLeakBias) );
p = saturate( (p - lightLeakBias) / (1.0f - lightLeakBias) );
return max( p, depth <= moments.x );
}

正在加载...
取消
保存