Bizarre dotted line in uv boundary when use RepeatWrapping

Recently I want to paste a panorama texture onto an Irregular sphere,I use shadermaterial and get every frag_position to match their uv coordinate,but after doing that ,a dotted line on the screen.
~V9GM116ND9%7DO_YBTVR%40T_E
here is my fragment shader code

'vec3 fragLocalPosition=vec3(0.0);',
'vec2 Uv2=vec2(0.0,0.0);',
// Spherical coordinates left lon,right is lat
'fragLocalPosition=vec3(fragPosition.x-pp.x,fragPosition.y-pp.y,fragPosition.z-pp.z);',
'fragLocalPosition=(sm*vec4(fragLocalPosition,1.0)).xyz;',			

'Uv2=vec2(degrees(atan(fragLocalPosition.z/fragLocalPosition.x))/360.0,(90.0+degrees(asin(fragLocalPosition.y/length(fragLocalPosition))))/180.0  );',
'if(fragLocalPosition.x>=0.0){Uv2.x+=.5;}',
'return texture2D(t, Uv2);',

ps::some Features of this line

  • its UVx NOT Appear only in 0 or 1, but just appear in UV’s startX and endX(RepeatWrapping -0.25 to 0.75 and this line appear in 0.75 instead of UVx==0),it can appear in any position

  • With I rotate the camera ,Its Step value and positon (Frequency and phase)CHANGING too

Any chances you provide a live example that shows the glitch?

thanks! here you are https://jsfiddle.net/f2Lommf5/12110/

Um, interesting. I’ve changed your code a bit so it uses the built-in equirectangular shader of three.js. I can see the same glitch if you move the camera a bit to the left. It’s like a seam which ranges from the bottom to the top of the skybox.

Demo: https://jsfiddle.net/f2Lommf5/12169/

You can also see the seam in one of the official examples (just click on “Equirectangular”):

https://threejs.org/examples/#webgl_materials_envmaps

image

It is very kind of you to help me.And a expert tell me this is because of the Minification Filters and Magnification Filters mode,set them as LinearFilter ALL can work! But I do not know the derlying cause of the problem.Maybe you know what’s wrong
(AHa! 10 hours ago, I asked a guy whose nickname is 06wj in github,maybe you are familiar with this name,he is an expert in China)

Indeed, setting the minFilter of the texture to LinearFilter solves the problem. But now no mipmapping is used which is unfortunate since mipmapping improves the visual quality of the texture.

Maybe it’s a good idea to transfer this topic to github. Are you willing to open an issue at the official github repo :innocent: ?

OK,See at github!:rabbit: