black lines in skybox

hi, i tried the built in skybox, but there is some thin black lines, where i suppose the seam is. Does anyone know how to eliminate them?

Have you checked your image to make sure there isn’t a border? and that the texture is tilable?

No problemo :slight_smile:

Tilable images should have similar pixels on one edge to another edge, this is an excellent explaination : http://graphicssoft.about.com/library/weekly/aa080499p2.htm

I know in gimp there is a nice menu option to make seamless, but I don’t know how to do it in photoshop. From what I can google you need to use the offset filter … couldn’t find any recent tutorials on how to do this, hopefully someone else can help you with that :slight_smile:

1 Like

Change the texture mode to “clamp”.

3 Likes

that did it, thanks a lot

thanks xomg !

If someone wants, with c# script :

myTexture.wrapMode = TextureWrapMode.Clamp;

Hi, since we updated Unity to 2017, this problem started to happen.
But the wrapMode solution dont work…

This is the code to view the skybox texture:

    fixed4 frag (v2f i) : SV_Target
    {
        float3 dir = normalize(i.texcoord);
        float2 longlat = float2(atan2(dir.x , dir.z ) + UNITY_PI, acos(-dir.y));
        float2 uv = longlat / float2(2. * UNITY_PI, UNITY_PI);

        fixed4 col = tex2D(_Tex , uv);
        return col;
    }

We guess that the atan2 is returning an infinity value when the normalized dir is zero.
This is the same method suggested in this shader offered from Unity:

Our shader worked well before updating from 5.6.1.

I have the same issue as Ricardo. Please help.

here is a screenshot. Happening with Skybox on Unity 1.1

I encountered the same problem, and I solved it by turning off “Generate Mip Maps”

1 Like

Setting the texture wrap mode to clamp solved the issue for me too. Thanks.

Change its Texture Type from Default to Sprite (2D and UI) just resolved for me

1 Like