问题描述
当我渲染一个立方体和纹理它,我结束了沿着立方体白边。我检查了顶点和纹理坐标,他们看起来没什么问题。我的质地是电源的2这是一个纹理贴图含4×4的纹理,其中,每个纹理是16×16像素。有没有人有什么建议?
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?
推荐答案
我猜你所遇到的质感出血。你可以通过使用GL_CLAMP上的纹理或略微调整您UV坐标0.0005和0.0095(例如),而不是0和1来补偿纹理采样伪影
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.
这篇关于出现在立方体的边缘白边的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!