Version: 2017.1
GPU instancing
Возможности графического оборудования и эмуляция

Делимые текстуры (Sparse Textures)

Sparse textures (also known as “tiled textures” or “mega-textures”) are textures that are too large to fit in graphic memory in their entirety. To handle them, Unity breaks the main texture down into smaller rectangular sections known as “tiles”. Individual tiles can then be loaded as necessary. For example, if the camera can only see a small area of a sparse texture, then only the tiles that are currently visible need to be in memory.

Иными словами, делимые текстуры ведут себя так же, как и любая другая текстура в шейдере: у них есть свойства множественного отображения (MIP mapping), на них может применяться любой способ фильтрации и т.д. Если вы попытаетесь прочитать данные плитки, не загруженной в память, вы можете получить неопределенный результат (на многих графических процессорах результатом будет черный цвет, однако это не гарантировано).

Стоит отметить, что не всякое аппаратное обеспечение и не все платформы поддерживают делимые текстуры. Например, на системах под DirectX для их работы требуется DX11.2 (Windows 8.1) и достаточно новый графический процессор, а под OpenGL для них требуется поддержка расширения ARB_sparse_texture. Также для работы с делимыми текстурами необходима лицензия Unity Pro.

See the SparseTexture script reference page for further details about handling sparse textures from scripts.

Код примера

A minimal example project for sparse textures is available here.

Sparse texture as shown in the example project
Sparse texture as shown in the example project

The example shows a simple procedural texture pattern and lets you move the camera to view different parts of it. Note that the project requires a recent GPU and a DirectX 11.2 (Windows 8.1) system, or using OpenGL with ARB_sparse_texture support.

GPU instancing
Возможности графического оборудования и эмуляция