目前大概是做了這些手術:
- ScriptableRenderPass.cs:
…
//add by akilar, append a flag for check need set render target
public virtual bool IsSetRenderTarget() { return true; }
… - ScriptableRenderer.cs:
//add by akilar
void ExecuteRenderPass(ScriptableRenderContext context, ScriptableRenderPass renderPass,
ref RenderingData renderingData)
{
//add by akilar
if (!renderPass.IsSetRenderTarget())
{
renderPass.Execute(context, ref renderingData);
return;
}
...
//modify by akilar, disalbe first check setting, only check need reset render target
/*if (passColorAttachment == m_CameraColorTarget &&
!m_FirstCameraRenderPassExecuted)
{
m_FirstCameraRenderPassExecuted = true;
...
}
// Only setup render target if current render pass attachments are different from the active
ones
else*/
if (passColorAttachment != m_ActiveColorAttachment || passDepthAttachment !=
m_ActiveDepthAttachment)
{
SetRenderTarget(cmd, passColorAttachment, passDepthAttachment, renderPass.clearFlag,
renderPass.clearColor);
}
...
}
跟LWRP的恩怨情仇持續中…讓我們繼續看下去…
沒有留言:
張貼留言