单相机加 AfterRenderingPostProcessing event 会造成 FinalBlitPass source rt 错误

This commit is contained in:
StarBeats 2025-04-25 17:22:03 +08:00
parent 17d8701725
commit 538b12622f
2 changed files with 8 additions and 0 deletions

View File

@ -141,6 +141,10 @@ namespace UnityEngine.Rendering.Universal.Internal
m_Source = renderingData.cameraData.renderer.cameraColorTargetHandle;
}
if (m_Source != cameraData.renderer.GetCameraColorBackBuffer(cmd))
{
m_Source = renderingData.cameraData.renderer.cameraColorTargetHandle;
}
using (new ProfilingScope(cmd, ProfilingSampler.Get(URPProfileId.FinalBlit)))
{
m_PassData.blitMaterialData.material.enabledKeywords = null;

View File

@ -21,6 +21,9 @@ namespace X.Rendering.Feature
private XeSS.xess_2d_t rendererSize;
private bool resetHistory = false;
private static bool supportXess2;
public static bool SupportXess2 => supportXess2;
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
}
@ -29,6 +32,7 @@ namespace X.Rendering.Feature
{
needTurnOnXess = true;
profiler = new ProfilingSampler("Xess2");
supportXess2 = XeSS.IsFeatureSupported();
}
public bool InitFeature()