- Home /
Strange behaviour in shader
I'm playing with a sphere and shader graph to discover it, and I have a little problem I don't achieve to solve. When I use any noises for the albedo in PBR master, I have a line across the middle of the sphere which appears. The "texture" also shrink at the sphere's poles. Here's a picture of what's happening:
Is this happening because of how the noise is spread ? How can I fix this ?
That is not strange behaviour, it is expected to work like this. Your texture is probably an undistorted square or rectangle, which is perfectly fine when you want to apply it to a 2D surface. But when you apply such things to a 3D surface like a sphere, you have to change the UVs, so it matches the sphere. If you don't, you end up getting the shrinks on the poles.
The noise pattern is another problem. When you apply the texture to a 2D surface, it's perfectly fine, since the two ends will never meet. But with a sphere, you have to use a tileable texture or something like that, so the two ends can seamlessly connect.
I would suggest reading about spherical UV mapping. Unfortunately i cannot help you with shader graph, but addressing these problems can get you started.
Thank you for the response. It seems shader graph have node converting UV's cartesian coordinates to polar ones, which allows to avoid the shrinking at the poles. But there is no built-in node to convert a noise to a texture. So, for now it would appear that we must write by ourself a node for this purpose.
I don't know much about noise functions on spheres, but i was searching around a bit, and found some topics. $$anonymous$$any of those suggested not using a 2D texture and wrapping it around a sphere but rather using a 3D noise with the surface coordinates of the sphere as input. $$anonymous$$aybe it's worth a try if you are not using it in real-time, since that could get really heavy unless you use less octaves in the generation process.
Your answer
![](https://koobas.hobune.stream/wayback/20220612235239im_/https://answers.unity.com/themes/thub/images/avi.jpg)