Hello Guest

sphere texture

  • 2 Replies
  • 504 Views
sphere texture
« on: October 05, 2017, 10:32:22 »
why i have this bug when i texture ball?


https://imgur.com/boaIvDr

*

Offline KaiHH

  • **
  • 97
Re: sphere texture
« Reply #1 on: October 05, 2017, 17:54:55 »
With standard filtering, OpenGL is interpolating beyond the edges of the texture at the coordinates around 0.0 and 1.0 and uses the texture's border color wraps around/repeats at the other side of the texture.
Use CLAMP_TO_EDGE wrap mode to fix this:
Code: [Select]
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
« Last Edit: October 05, 2017, 20:30:06 by KaiHH »

Re: sphere texture
« Reply #2 on: October 06, 2017, 05:12:47 »
is not fixing it