Repeated textures are severely distorted/shaking when rotating camera

后端 未结 2 1888
故里飘歌
故里飘歌 2021-01-18 04:10

I originally asked this question on gamedev, but none of the answers helped to solve problem, and I still have no clue what is the real cause. I didn\'t see anything about r

2条回答
  •  春和景丽
    2021-01-18 05:01

    I ran into similar problem under iOS. After repeating the texture 127 times, bad things started to happen.

    The solution that worked was this:

    I used GL_TRIANGLE_STRIP with some degenerate triangles. The texture is aligned to the vertieces, so at the edge of the texture there is an invisible (degenerate) triangle, where the texture is "displayed" mirrored as I set the texture coordinate to the origin. Thus the next visible triangle shows the texture from coordinate (0.0, 0.0) and it never goes over coordinate (x, 127.0).

    There is a blog post explaining this with some examples and pictures.

提交回复
热议问题