当前位置:网站首页>Chapter 11 advanced data management of OpenGL super classic (version 7)
Chapter 11 advanced data management of OpenGL super classic (version 7)
2022-06-30 05:01:00 【Jason_ Chen__】
Tips : When the article is finished , Directories can be generated automatically , How to generate it, please refer to the help document on the right
OpenGL Super treasure ( The first 7 edition ) Chapter 11 advanced data management
Preface
How to write data from shaders to cache and textures
How to make Opengl More flexible interpretation of data
CPU And GPU How to share data directly
One 、 Unbind
sketch : Disassociate the sampler variable from the texture unit , Use texture handles instead of
reason :1. The number of textures that a single shader can access is limited 2. Binding and unbinding take time
usage : Use GL_ARB_bindless_texture Expand , Use texture to generate texture handles , Put the texture into resident memory through the texture handle
GLuint64 glGetTextureHandleARB(): Use texture to generate texture handles and return to texture handles
GLuint64 glGetTextureSamplerHandleARB(): Bound texture unit , Returns the texture handle
void glMakeTextureHandleResidentARB(): Put the texture into resident memory through the texture handle
void glMakeTextureHandleNonResidentARB(): Move the texture out of resident memory through the texture handle
Two 、 Sparse texture
sketch : Divide the texture into multiple rows or rectangular areas , The user can control the display of these areas , Commonly used in game maps
page : One of a plurality of square rows or rectangular regions into which a texture is divided
Transfer page : You can use it like a normal texture
No transfer page : The texture of this area is not stored
To use sparse textures, use GL_ARB_sparse_texture Expand , And before allocating memory for the texture , To use glTextureParameteri() Statement
Example : Stream texture data in chronological order ( People words : The first time a player starts a game is , High resolution close to the player , Far away from the player , The distance is mapped to the level of detail of texture extraction )
3、 ... and 、 Compress texture
sketch : Use RGTC Compress the texture into small independent data blocks , Because data blocks are independent of each other , When decompressing, it can be placed in single thread parallel decompression
Compressed format : Data blocks ,( Like other compressed formats )
The compression ratio is fixed
The compression effect is not very good , But suitable for random access , And lossless compression
Suitable for images with smooth areas
Four 、 Compressed data format
sketch :opengl Supported compressed data formats , for example :GL_UNSIGNED_SHORT_5_6_5
5、 ... and 、 High quality texture filtering
Linear filtering and closest filtering
Closest to filtering : Select the texture element whose sampling point is closest to the texture coordinate
Linear filtering : The filtering method is linear interpolation , High quality , Shaders use smooth interpolation functions smoothstep() It can optimize the artifacts of enlarged texture images
summary
Unbound texture : You can make shaders have an unlimited number of textures
Sparse texture : Manage the memory allocated to each texture object
Compress texture : Improve texture resource utilization
High quality texture filtering : Optimize linear filtering details , Improve image quality
边栏推荐
- Create transfer generation point
- Unity ontriggerenter does not call
- Unreal 4 learning notes - set player birth point
- Static keyword
- Li Kou 2049: count the number of nodes with the highest score
- Unrealeengine4 - about uobject's giant pit that is automatically GC garbage collected
- Solution to the 292 week match of Li Kou
- C # Foundation
- harbor api 2.0查询
- 图的一些表示方式、邻居和度的介绍
猜你喜欢

【Paper】2017_ Distributed control for high-speed trains movements

Check London attractions suitable for parents and children in winter vacation

Force buckle 977 Square of ordered array

Li Kou 2049: count the number of nodes with the highest score

Moore Manor diary I: realize the reclamation, sowing, watering and harvest in Moore Manor

Pit of smoothstep node in shadergraph

PBR material: basic principle and simple fabrication

Using the command line to convert JSON to dart file in fluent

Oculus quest2 development: (I) basic environment construction and guide package

A virtual reality secret room escape adventure, let you see Technology Singapore
随机推荐
Winter vacation parent-child tour, these new york attractions are not only fun but also knowledge
Unity ontriggerenter does not call
Why does the computer have no network after win10 is turned on?
Li Kou 2049: count the number of nodes with the highest score
Unity profiler performance analysis
Force buckle 704 Binary search
Unity script life cycle and execution sequence
【VCS+Verdi联合仿真】~ 以计数器为例
【 VCS + Verdi joint simulation】 ~ Taking Counter as an Example
Generate a slice of mesh Foundation
LxC and LXD container summary
2021-07-29 compilation of Cura in ubantu18.04
一条命令运行rancher
Spring Festival Tourism Strategy: welcome the new year in Bangkok, Thailand
Singapore parent-child tour, these popular attractions must be arranged
Leetcode 180 Consecutive numbers (2022.06.29)
Singapore must visit these scenic spots during the Spring Festival
Force buckle 977 Square of ordered array
Unreal 4 learning notes - Animated Montage
Unity automatic pathfinding