浏览代码

Fixed broken cascade selection with high camera FoVs.

/RenderPassXR_Sandbox
uygar 8 年前
当前提交
ca95a021
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 6
      Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowAlgorithms.hlsl

6
Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowAlgorithms.hlsl


dirShadowSplitSphereSqRadii.z = dirShadowSplitSpheres[2].w;
dirShadowSplitSphereSqRadii.w = dirShadowSplitSpheres[3].w;
if( distances2.w > dirShadowSplitSphereSqRadii.w )
return -1;
return int( 4.0 - dot( weights, float4(4.0, 3.0, 2.0, 1.0 ) ) );
int idx = int( 4.0 - dot( weights, float4( 4.0, 3.0, 2.0, 1.0 ) ) );
return idx <= 3 ? idx : -1;
}
uint EvalShadow_LoadSplitSpheres( ShadowContext shadowContext, int index, out float4 splitSpheres[4] )

正在加载...
取消
保存