The only photosphere - there is a 1px line,

I created a photosphere viewer in Unity and used a custom shader according to this stackoverflow question.

Everything looks perfect, except there is a 1px line right where the image ends and the join starts.

(Its definitely not from the picture)

Any ideas?

Update: It seems to be coming from the sphere itself and not from the display. I changed the shader code to move the coordinates.

 float2 sphereCoords = float2(lon, lat) * (1.0 / PI);
 float2 sphereCoords = float2(lon**+0.2**, lat) * (1.0 / PI);

      

This rotates the projection of the image slightly and separates the spherical splines from the start / end of the image. Now I can see that the ends of the images end perfectly and the artifact still exists, but not where the image starts. This isolates the problem to the realm itself (I think). I am using Unity's built-in scope with its defaults unchanged.

As if the camera can see one semicircle going from the bottom to the very top of the sphere.

enter image description here

+3


source to share


1 answer


This can happen if you have the Wrap Mode texture set to Repeat instead of Clip.



Repeat will repeat textures exactly as they are, Clamp will try to align border pixels with adjacent textures to create the smooth transition you almost certainly want for the photosphere.

+1


source







All Articles