About the deformation of the material

image


I added a custom material to the line, But if the line is long,Then my image will be stretched out of shape
How should this problem be solved?

1 Like

@chenwwsdo

Thank you for sharing this with the community! From your screenshot, I can see that the arrows are stretched out. However, it is very difficult for me to look through your code when you share it as an image. Could you please share a sandcastle demo that showcases what you have so far? This will help me (and the rest of the community) effectively help you resolve your bug.

-Sam

hi Sam!
I just implemented my example in Sandcastle. You can zoom in and out to see how the image changes.
This problem has puzzled me for a long time :sob:

1 Like

@chenwwsdo

Thank you very much for sharing the sandcastle demo with me! I will take a look at the demos and do a deep dive later this afternoon or tomorrow morning. In the meantime, one temporary workaround would be to simply string together multiple shorter lines. This would avoid the line stretching problem that you outlined in your first post. Please let me know what you think!

-Sam

hi Sam!
Yes, it is a solution. But sometimes I can’t ask the user to do that .

  • Regarding this bug, I wonder if there is something wrong with my shader. In shaders, there is no tiling solution
1 Like

@chenwwsdo

I understand - stringing together multiple lines is a bit more cumbersome. :smiley: :sweat_smile:

I think your suspicion is correct. There is likely a part of your shader that needs to be tweaked. I have limited experience with shaders in CesiumJS. Regardless, I think this is where you should start your investigation. Please keep me updated on your progress :rocket:

-Sam