浏览代码

Make the view (shadow) matrix of point lights left-handed (to match spot lights)

/fptl_cleanup
Evgenii Golubev 8 年前
当前提交
fd637ec5
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
      Assets/ScriptableRenderPipeline/RenderPasses/ShadowRenderPass.cs

3
Assets/ScriptableRenderPipeline/RenderPasses/ShadowRenderPass.cs


var settings = new DrawShadowsSettings(cullResults, lightIndex);
bool needRendering = cullResults.ComputePointShadowMatricesAndCullingPrimitives(lightIndex, (CubemapFace)s, 2.0f, out view, out proj, out settings.splitData);
// The view matrix for point lights flips primitives. We fix it here (by making it left-handed).
view.SetRow(1, -view.GetRow(1));
SetupShadowSplitMatrices(ref shadowSlices[shadowSliceIndex], proj, view);
if (needRendering)
RenderShadowSplit(ref shadowSlices[shadowSliceIndex], lightDirection, proj, view, ref loop, settings);

正在加载...
取消
保存