浏览代码

Fixed wrong projection inversion being used for orthographic projections.

/main
uygar 7 年前
当前提交
f7a762c8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowUtilities.cs

2
ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowUtilities.cs


cullResults.ComputeDirectionalShadowMatricesAndCullingPrimitives( lightIndex, (int) cascadeIdx, cascadeCount, ratios, (int) width, nearPlaneOffset, out view, out proj, out splitData );
// and the compound (deviceProj will potentially inverse-Z)
Matrix4x4 deviceProj = GL.GetGPUProjectionMatrix( proj, false );
InvertPerspective( ref deviceProj, ref view, out vpinverse );
InvertOrthographic( ref deviceProj, ref view, out vpinverse );
return deviceProj * view;
}

正在加载...
取消
保存