开发者

White edges appearing at edge of cube

开发者 https://www.devze.com 2023-02-14 18:45 出处:网络
When 开发者_StackOverflow中文版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 o

When 开发者_StackOverflow中文版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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消