两种纹理的幂
你能解释一下,为什么长时间纹理需要硬件加速是2的幂吗?对于 PC,从 GeForce 6 开始,我们实现了无 mips 和简化过滤的 npot 纹理。 OpenGL ES 2.0 还支持不带 mipmap 等的 npot 纹理。这有什么硬件限制吗?只是简单的算术?
Can you explain me, why hardware acceleration required for a long time textures be power of two? For PCs, since GeForce 6 we achieved npot textures with no-mips and simplified filtering. OpenGL ES 2.0 also supports npot textures without mipmaps and etc. What is the hardware restriction for this? Just simplified arithmetics?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想这与能够使用按位左移操作有关,而不是通过乘法将 (x, y) 坐标转换为距纹理开头的内存偏移量。所以,是的,从处理器的角度来看,简化了算术。
I imagine it has to do with being able to use bitwise shift-left operations, rather than multiplication to convert an (x, y) coordinate to a memory offset from the start of the texture. So yes, simplified arithmetics, from a processor point of view.
我猜测这是为了使 mipmap 生成更容易,因为它允许您将 2x2 像素从 NxN 一直到 1x1 平均为一个像素。
现在,如果您不使用 mipmapping 也没关系,但只有一个规则会更容易,而且我认为 mipmapping 是更常见的用例。
I'm guessing that it was to make mipmap generation easier, because it allows you to just average 2x2 pixels into one pixel all the way from NxN down to 1x1.
Now that doesn't matter if you're not using mipmapping, but it's easier to have just one rule, and I think that mipmapping was the more common use case.