浏览代码

Fixed scaling issue with camera viewport

/main
Felipe Lira 7 年前
当前提交
d36ea376
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      com.unity.render-pipelines.lightweight/LWRP/Passes/ForwardLitPass.cs

6
com.unity.render-pipelines.lightweight/LWRP/Passes/ForwardLitPass.cs


// If rendering to an intermediate RT we resolve viewport on blit due to offset not being supported
// while rendering to a RT.
if (colorAttachmentHandle == -1 && cameraData.isDefaultViewport)
if (colorAttachmentHandle == -1 && !cameraData.isDefaultViewport)
cmd.SetViewport(camera.pixelRect);
context.ExecuteCommandBuffer(cmd);

CommandBuffer cmd = CommandBufferPool.Get("Final Blit Pass");
cmd.SetGlobalTexture("_BlitTex", sourceRT);
if (!cameraData.isDefaultViewport)
// We need to handle viewport on a RT. We do it by rendering a fullscreen quad + viewport
if (colorAttachmentHandle != -1 && !cameraData.isDefaultViewport)
}
else
{

正在加载...
取消
保存