# URP管线自身代码问题

URP管线自身代码问题

7.7.1

  • 修复通过 CameraCaptureBridge.AddCaptureAction 抓屏抓到的是没经过后处理的

    • 408行开始
                  if (renderingData.cameraData.captureActions != null)
                  {
                      m_CapturePass.Setup(m_ActiveCameraColorAttachment);
                      EnqueuePass(m_CapturePass);
                  }
      
                  // if we applied post-processing for this camera it means current active texture is m_AfterPostProcessColor
                  var sourceForFinalPass = (applyPostProcessing) ? m_AfterPostProcessColor : m_ActiveCameraColorAttachment;
      
      替换为
                  // if we applied post-processing for this camera it means current active texture is m_AfterPostProcessColor
                  var sourceForFinalPass = (applyPostProcessing) ? m_AfterPostProcessColor : m_ActiveCameraColorAttachment;
      
                  if (renderingData.cameraData.captureActions != null)
                  {
                      m_CapturePass.Setup(sourceForFinalPass);
                      EnqueuePass(m_CapturePass);
                  }
      
  • 修复相机勾选 Post Processing 后,通过 CameraCaptureBridge.AddCaptureAction 抓屏屏幕卡住

    • 426行开始
          bool cameraTargetResolved =
          // final PP always blit to camera target
          applyFinalPostProcessing ||
          // no final PP but we have PP stack. In that case it blit unless there are render pass after PP
          (applyPostProcessing && !hasPassesAfterPostProcessing) ||
          // offscreen camera rendering to a texture, we don't need a blit pass to resolve to screen
          m_ActiveCameraColorAttachment == RenderTargetHandle.CameraTarget;
      
      替换为
          bool cameraTargetResolved =
          // final PP always blit to camera target
          applyFinalPostProcessing ||
          // no final PP but we have PP stack. In that case it blit unless there are render pass after PP
          (applyPostProcessing && resolvePostProcessingToCameraTarget) ||
          // offscreen camera rendering to a texture, we don't need a blit pass to resolve to screen
          m_ActiveCameraColorAttachment == RenderTargetHandle.CameraTarget;
      
  • 修复启用 UniversalRenderPipelineAsset 的 MSAA 后,通过 ScreenCapture.CaptureScreenshotIntoRenderTexture 抓屏出错
    7.3.1没有这个问题
    这个也不是URP代码问题,问题出在传入的 texture 上,该 texture 创建时不要设置
    m_texture.antiAliasing = QualitySettings.antiAliasing;

7.3.1

  • 修复通过 CameraCaptureBridge.AddCaptureAction 抓屏抓到的是没经过后处理的

    • 375行开始
                  if (renderingData.cameraData.captureActions != null)
                  {
                      m_CapturePass.Setup(m_ActiveCameraColorAttachment);
                      EnqueuePass(m_CapturePass);
                  }
      
                  // if we applied post-processing for this camera it means current active texture is m_AfterPostProcessColor
                  var sourceForFinalPass = (applyPostProcessing) ? m_AfterPostProcessColor : m_ActiveCameraColorAttachment;
      
      替换为
                  // if we applied post-processing for this camera it means current active texture is m_AfterPostProcessColor
                  var sourceForFinalPass = (applyPostProcessing) ? m_AfterPostProcessColor : m_ActiveCameraColorAttachment;
      
                  if (renderingData.cameraData.captureActions != null)
                  {
                      m_CapturePass.Setup(sourceForFinalPass);
                      EnqueuePass(m_CapturePass);
                  }
      
  • 修复相机勾选 Post Processing 后,通过 CameraCaptureBridge.AddCaptureAction 抓屏屏幕卡住

    • 393行开始
          bool cameraTargetResolved =
          // final PP always blit to camera target
          applyFinalPostProcessing ||
          // no final PP but we have PP stack. In that case it blit unless there are render pass after PP
          (applyPostProcessing && !hasPassesAfterPostProcessing) ||
          // offscreen camera rendering to a texture, we don't need a blit pass to resolve to screen
          m_ActiveCameraColorAttachment == RenderTargetHandle.CameraTarget;
      
      替换为
          bool cameraTargetResolved =
          // final PP always blit to camera target
          applyFinalPostProcessing ||
          // no final PP but we have PP stack. In that case it blit unless there are render pass after PP
          (applyPostProcessing && !dontResolvePostProcessingToCameraTarget) ||
          // offscreen camera rendering to a texture, we don't need a blit pass to resolve to screen
          m_ActiveCameraColorAttachment == RenderTargetHandle.CameraTarget;
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值