浏览代码

Added viewport camera code.

/RenderPassXR_Sandbox
Felipe Lira 7 年前
当前提交
0e48243b
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
      ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs

10
ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


cmd.SetRenderTarget(BuiltinRenderTextureType.CurrentActive);
}
if (!stereoEnabled)
{
Rect viewport = m_CurrCamera.rect;
viewport.x *= Screen.width;
viewport.y *= Screen.height;
viewport.width *= Screen.width;
viewport.height *= Screen.height;
cmd.SetViewport(viewport);
}
// Clear RenderTarget to avoid tile initialization on mobile GPUs
// https://community.arm.com/graphics/b/blog/posts/mali-performance-2-how-to-correctly-handle-framebuffers
if (m_CurrCamera.clearFlags != CameraClearFlags.Nothing)

正在加载...
取消
保存