Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Zigzag textures on a quad that tapers like a trapezoid. How to projective texturing?

Discussion in 'General Graphics' started by celaeno, Jul 6, 2020.

  1. celaeno

    celaeno

    Joined:
    Jan 31, 2013
    Posts:
    64
    Hello,

    I'm making a road with quads, but when the quad tapers (like a trapezoid), the textures get a zigzag pattern.

    Someone else had the same problem here and shows some images of the zigzag effect:

    https://gamedev.stackexchange.com/q...ing-artifacts-on-a-generated-mesh-that-tapers

    I understand it can be fixed by adding more triangles to the quad. But in the above link someone explained to uses projective texturing. Now I was not able to reproduce that code into a shader, I don't know much about shaders.

    Does anyone maybe have a shader or a simple solution for this problem?