I am using a depth-peeling algorithm to display transparency since Unity 5, and it works perfectly without any error.
I have just updated from Unity 2021.3 to Unity 6, and I now have this error message in the editor (not in standalone):
A call to Blit with source and dest set to the same RenderTexture may result in undefined behaviour.
It appears only once despite the fact that I do use Blit with the same source and destination quite a lot:
// Compose all the color buffers to obtain the final image
for (Int32 i=LocalPeelIterations-1; i>=0; i--)
{
m_CompositeMaterial.SetTexture(m_OIT_ColorBufferId, m_ColorBuffers[i]);
Graphics.Blit(ColorBufferAccum, ColorBufferAccum, m_CompositeMaterial);
RenderTexture.ReleaseTemporary(m_ColorBuffers[i]);
}
And that’s in ‘OnRenderImage()’, so it’s called quite often, and yet I have the error only once.
Even stranger, I have this error only in the editor, not in standalone.
My question is: is it a serious problem?
I mean, I have a single error in the editor, the rendering is exactly what I want, and this error wasn’t there from Unity 5 to Unity 2021.3.