System Information
Operating system: Manjaro Linux
Graphics card: AMD Radeon 535
Blender Version
Broken: 3.1.0
Short description of error
In Cycles, rendering a scene with transparent world background and shadow being projected into a shadow catcher causes a ring of pixels with very little opacity to be created around the render's edges when exporting it as a PNG. These artifacts go away when re-rendering the scene with the shadow catcher turned back into a normal plane.
I'm aware of T93865: Artifacts around shadow catcher object but created this one because it wasn't clear to me if this was the same issue, as that one seems to be considered a property of the 'Fast' denoiser. These artifacts were recorded on the 'Accurate' one.
Exact steps for others to reproduce the error
-In Cycles, make the world background transparent
-Move the default cube slightly up and add a plane, scale it up a bit.
-Point the camera so that your render captures the cube projecting a shadow into the plane, but still has the transparent world background showing around the edges
-Turn the plane into a shadow catcher and render the scene with denoising on. Export it as a PNG; color depth and compression don't affect this issue.
-Save the render and open it in Krita (other image editing applications may have the following feature too)
-On the Select menu, use Select Opaque to highlight all pixels with some opacity. You will notice pixels very close to the image border all around the edges. These are normally invisible, being of very low alpha, but if you stack many renders produced like this they will be revealed as being grayscale.
-Now, change nothing else, but turn the shadow catcher into a normal plane. Render the scene again, save it with the same settings. The ring of noise around the image edges will have disappeared.
Screenshot of Krita showing the opaque pixels on a normal render:
Opaque pixels on the same scene rendered with the plane made into a shadow catcher and denoising set to Accurate. Note the barely visible artifacts selected around the plane and image edge. These can be observed no matter what shape the render output takes.
And now the same scene, denoising turned off. No ring around the edges.
Blender file used for the renders above:



