渲染到平面四边形 (OpenGL) 上的纹理的 Mipmapping 问题
在将纹理渲染到平面四边形上时,我遇到了似乎是 mipmap 的问题。在某些相机位置,物体看起来很好,但在其他位置,它变得非常模糊。不幸的是,我对这个问题没有任何好的线索,但我想如果我发布一些其他有过其他问题经历的图片可能会给我一些见解。
正常:
缩小:
旋转:
有人能给我任何关于这里可能发生的事情的线索吗?
I am having what seems to be a mipmapping problem when rendering textures on to a flat quad. At some camera positions the object looks fine, but then at others it gets very fuzzy. Unfortunately I don't really have any good leads on this problem but I thought if I posted some pictures other who have experiences other issue might be able to give me some insight.
Normal:
Zoomed Out:
Rotated:
Could anyone give me any clues about what could be going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确定提供了正确的 mipmap 吗?因为看起来您提供了损坏的纹理数据作为 mipmap。
Are you sure you are providing the correct mipmaps? Because that looks like you provided corrupt texture data as mipmaps.
看来这个问题更多的是一个状态问题,GL_UNPACK_ROW_LENGTH 在其他地方设置(在本例中为 512),但对于这个特定纹理,它需要为 32,因此这个问题通过简单的解决(glPixelStorei GL_UNPACK_ROW_LENGTH 32)。
It seems that this problem was more of a state issue, the GL_UNPACK_ROW_LENGTH was getting set elsewhere (in this case to 512) but it needed to be 32 for this particular texture so this problem was fixed with a simple (glPixelStorei GL_UNPACK_ROW_LENGTH 32).