SCNPlane Displays Image Edge

If I use Xcode 10.1's SceneKit editor to add a SCNPlane to the scene and then assign a .png image as the diffuse material, a thin line appears at the top edge of the plane when the scene is rotated on the x and y axes. When I attempt to remove the axes rotations and view the scene from the front, the line disappears. All other material properties are left at their default values. Changing the lighting model does not cause the line to disappear.


The deployment target is iOS 12.1. No third party 3D editing software is involved with this problem. The image was created in Adobe's Photoshop with transparency and the line appears in the scene when images of various sizes are tested.

This problem cost me a week of wasted time. Although it has nothing to do with SceneKit, I though others might be interested to know the solution: The problem is associated with the way Photoshop crops a .png file to conserve memory. The transparent area around the image is removed unless a layer mask is added to the layer containing the image. It's important that the layer included some padding around the image: The padding serves as a transparent margin which prevents the artifact from appearing when the layer includes a layer mask.

SCNPlane Displays Image Edge
 
 
Q