1.FilterMode 过滤模式
| Point | Point filtering - texture pixels become blocky up close. 点过滤-纹理像素变成块状。 |
| Bilinear | Bilinear filtering - texture samples are averaged. 双线性过滤 -纹理采样平均。 |
| Trilinear | Trilinear filtering - texture samples are averaged and also blended between mipmap levels. 三线性过滤 - 纹理采样平均并且混合mipmap 级别之间。 |
texture.filterMode = FilterMode.Point;2.纹理合并(
打包多个纹理到一个纹理图集。)
| PackTextures参数 | 描述,换行请使用\\空格 |
| textures | Array of textures to pack into the atlas. 要打包到图集的纹理的数组。 |
| padding | Padding in pixels between the packed textures. 打包的纹理之间的像素间距。 |
| maximumAtlasSize | Maximum size of the resulting texture. 图集的最大大小。 |
| makeNoLongerReadable | Should the texture be marked as no longer readable? 纹理标记为不可读? |
Texture2D[] textures = Resources.LoadAll<Texture2D>(_path);
Texture2D _atlas = new Texture2D(1, 1);
Rect[] rects = _atlas.PackTextures(textures, _padding, 2048);
本文介绍了Unity中三种纹理过滤模式:点过滤使纹理像素在近距离下变得块状;双线性过滤平滑纹理采样;三线性过滤进一步在不同mipmap级别间混合纹理。此外还介绍了如何使用PackTextures方法将多个纹理合并到一个纹理图集中。
5294

被折叠的 条评论
为什么被折叠?



