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); }
- 408行开始
-
修复相机勾选 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;
- 426行开始
-
修复启用 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); }
- 375行开始
-
修复相机勾选 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;
- 393行开始