White edges appearing at edge of cube

2019-04-15 11:35发布

When I render a cube and texture it I end up with white edges along the cube. I've checked the vertex and texture coordinates and they look fine to me. My texture is a power of 2. It is a texture map containing 4x4 textures in which each texture is 16x16 pixels. Does anyone have any suggestions?

1条回答
家丑人穷心不美
2楼-- · 2019-04-15 12:34

I guess you are experiencing texture bleeding. You can solve it by either using GL_CLAMP on your textures or adjusting slightly your UV coordinates to 0.0005 and 0.0095 (for instance) instead of 0 and 1 to compensate for the texture sampling artifacts.

查看更多
登录 后发表回答