Does Unity Care is a texture of power of two
来源:互联网 发布:java实际问题汇总 编辑:程序博客网 时间:2024/06/07 18:45
1.
I`ve heard rumours that future graphics cards are not longer bound to the pow 2 rule, but current Graphics cards uses a power of two texturesizes to work with them. 2, 4 , 8, 16 ... 128, 256, 512 ... 4096.Texturesizes with power of two are 64x64, 256x256 etc. . But also 512x256 or 1024x128. When the graphics size is different a power of two the graphcis card reservers the ram for next higher power of two size. Let`s say you have a texture of 2500x1032. That`s around 7.38 Mb. Then the graphics card reserves the size of 4096x2048. Which is of course much more than what your texture really has. Around 24 Mb. The worst case scenario is a 2049x2049 which uses 144 MB ram then, compared to a 2048x2048 that only uses 12 mb ram.
The compression format DDS is also a special chapter. It`s the only texture compression format that works directly in the graphics card. And it is also bound to the pow2 rule. When the texturesize is not pow 2 , then the DDS algorythm fails. And so you cannot use DDS compression.
It fixes the above issues. But beware with big textures. They become even bigger by that. I would suggest never to go above 2048. Best method is to use pow 2 texturesizes as the main solution though
2.
Also PVRTC has different requirements than DXT.
DXT does not require square and it requires multiply 4 texture lengths
PVRTC requires square textures that have power of 2 lengths
3.
It is possible to use other (non power of two) texture sizes with Unity. Non power of two texture sizes work best when used on GUI Textures, however if used on anything else they will be converted to an uncompressed RGBA 32 bit format. That means they will take up more video memory (compared to PVRT(iOS)/DXT(Desktop) compressed textures), will be slower to load and slower to render (if you are on iOS mode). In general you'll use non power of two sizes only for GUI purposes.
Non power of two texture assets can be scaled up at import time using the Non Power of 2 option in the advanced texture type in the import settings. Unity will scale texture contents as requested, and in the game they will behave just like any other texture, so they can still be compressed and very fast to load.
http://unity3d.com/support/documentation/Manual/Textures.html
So in essence, yes, Unity does care as it will automatically assign properties to the texture unless you override it to do differently. When using a compressed format, you'll see that all textures are scaled automatically to a square power of 2 texture size. With a compressed format, this is done automatically because compression rates typically will only work well with power of 2 sizes. If they are not, they will be practically double the size, which is why this is automatically done for you.
Also, compression and power of 2 sizes can be hardware dependent, as well as the algorithm used (such as PVRTC on iOS). Non Power of Two (NPOT) texture capability can vary, say from the PowerVR chipset in the iPhones to something else on an Android phone.
Power of 2 textures nowadays are typically requested by the Game Engine strictly for mip-mapping purposes. If the texture is not in the dimensions of power of 2, then processing for mip-mapping won't be able to take place.
Conclusion:Texture had better be power of two sizes
- Does Unity Care is a texture of power of two
- determine if it is a power of two.
- Given an integer, write a function to determine if it is a power of two.
- Given an integer, write a function to determine if it is a power of two
- Ten Ways to Check if an Integer Is a Power Of Two in C
- Write one line C function to find whether a no is power of two
- Ten Ways to Check if an Integer Is a Power Of Two in C
- Ten Ways to Check if an Integer Is a Power Of Two in C
- n is a power of 2 ?
- Power of Two
- [LeetCode] Power of Two
- 【LeetCode】Power of Two
- Power of Two
- power of two
- [Leetcode]Power of Two
- Power of Two
- [leetCode] Power of Two
- Power of Two
- PAT_A_1013 Battle Over Cities
- percona-toolkit工具集pt-kill使用举例
- ZooKeeper-3.3.4集群安装配置
- FFMPEG中最关键的结构体之间的关系
- Hadoop已经成为大数据分析平台的标配
- Does Unity Care is a texture of power of two
- sqlite API
- Struts2入门(一)_使用Filter实现MVC
- 观察者模式
- 数据库高级教程(三)
- hdu1272
- 记录下。搞了几天的U方法带变量
- UVaUVa 1595 - Symmetry
- TCP通信流程解析