为什么必须将纹理的尺寸设置为两倍的倍数? [英] Why do textures have to be sized a multiple of two?

查看:104
本文介绍了为什么必须将纹理的尺寸设置为两倍的倍数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于OpenGL渲染,纹理大小必须为2的倍数.为什么会有这个限制?它与内存使用量或GPU处理纹理的方式有关吗?

For OpenGL rendering, the texure sizes have to be a multiple of two. Why is there this restriction? Is it related to the memory usage, or the way the GPU processes textures?

为什么纹理的大小必须是二的倍数?

Why do textures have to be sized a multiple of two?

推荐答案

用于存储库中纹理的内存的最佳乘方为2(甚至比2的倍数更受约束),以实现最佳分区和最快的DMA.转移.

The memory used for texture in the memory banks are optimally powers of two (even more constrained than multiple of two) in order to allow best partitioning and fastest possible DMA transfers.

这篇关于为什么必须将纹理的尺寸设置为两倍的倍数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆