摘 要
虚拟纹理技术用于解决实时渲染中纹理数据量太大的问题,其主要思想为只加载纹理可见的部分,以达到节约显存的目的。虚拟纹理技术与内存管理中的虚拟内存技术相似, 需要将纹理图像分页并动态管理。
本研究利用 Vulkan 图形 API 中图像对象的稀疏绑定特性,为可见的纹理页分配显存对象,将显存对象与图像对象绑定,载入对应纹理数据供采样使用,当纹理页不再被采样, 解除绑定,释放储存空间,达到了与传统方法同样的效果。与传统方法相比,该方法实现简单,并且能够利用 Vulkan 的位块传输指令生成多级渐远纹理,不需要提前储存,进一步节省了储存资源。本研究达到了预期效果,能够根据视野范围判断纹理页的可见性,根据远近加载多级渐远纹理,降低了纹理对显存的要求。
关键词:虚拟纹理;Vulkan;稀疏绑定;节省显存
Abstract
Virtual texture technology is used to solve the problem of a large amount of texture data in real-time rendering. Its main idea is to load only the visible part of the texture, to save video memory. Virtual texture technology is similar to virtual memory technology in memory man- agement, which requires texture images to be paged and managed dynamically.
This study used Sparse Resource Features of Vulkan, which is that the visible texture page is allocated a storage object, the storage object is bound to the image object, and the corre- sponding texture data is loaded for sampling. When the texture page is no longer sampled, the binding is unbound and the storage space is released, which achieves the same purpose as the traditional method. Compared with the traditional method, the proposed method is simpler to achieved and can generate mipmap by using Vulkan’s support of bit-block transmission, with- out the need for storage in advance. So that it can save storage resources. This research achieves the desired effect. It can judge the visibility of the texture page according to the field of view and load the mipmap according to the distance, which reduces the requirement of texture on video memory.
Keywords: Virtual Texture; Vulkan; Sparse Binding; Video Memory
目录
第一章 绪论 4
1.1 课题研究背景及意义 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 研究现状 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 本文主要工作 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 本文组织结构 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
第二章 相关技术概述 6
2.1 Vulkan 中 纹 理 的 使 用 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 创建图像对象 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.2 使用图像对象 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Vulkan 的 稀 疏 资 源 特 性 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
第三章 本章算法 8
3.1 算法概述 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.1 问题分析 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.2 本文算法基本思想 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.3 本文算法流程 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 算法核心细节 10
3.2.1 位块传输参数计算 10
3.2.2 可见页的序号计算 11
3.2.3 使用缓冲传递可见性信息 11
3.3 其他算法实现细节 13
3.3.1 性能优化 13
3.4 采样算法 15
3.5 分页算法 15
第四章 实验结果与分析 16
4.1 实验概述 16
4.2 实验环境 16
4.3 实验结果与分析 16
第五章 总结与展望 18











