当前位置:网站首页>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
边栏推荐
- Oracle-数据的基本操作
- 003-JS-DOM-Attr-innerText
- Brew install NVM command not found solution
- Unity notes_ SQL Function
- Yolov5 torch installation
- Procedural animation -- inverse kinematics of tentacles
- redis集群概念
- 2021-06-17 solve the problem of QML borderless window stretching, window jitter and flicker when stretching and shrinking
- JPA composite primary key usage
- A collection of errors encountered in machine learning with unity
猜你喜欢

深度学习------不同方法实现Inception-10

Force buckle 59 Spiral matrix II

力扣59. 螺旋矩阵 II

Pit of smoothstep node in shadergraph

ParticleSystem in the official Manual of unity_ Collision module

How does unity use mapbox to implement real maps in games?

【Paper】2015_ Coordinated cruise control for high-speed train movements based on a multi-agent model

Singapore must visit these scenic spots during the Spring Festival

Connect to the database and run node JS running database shows that the database is missing

【Paper】2021_ Uniformity of heterogeneous hybrid multi-level intelligent systems using UGV and UAV
随机推荐
UE4 method of embedding web pages
Why does the computer have no network after win10 is turned on?
力扣27. 移除元素
Unity3d realizes Google Digital Earth
A collection of errors encountered in machine learning with unity
2021-07-29 compilation of Cura in ubantu18.04
Sailing experience not to be missed in New York Tourism: take you to enjoy the magnificent city scenery from different perspectives
Circle center technology, very anxious?
Efficiency test of adding and querying ArrayList and LinkedList
Pycharm database tool
[vcs+verdi joint simulation] ~ take the counter as an example
Operation file file class method
深度学习------不同方法实现Inception-10
Exploration of unity webgl
Unreal 4 unavigationsystemv1 compilation error
力扣704. 二分查找
Generate a slice of mesh Foundation
Create transfer generation point
Have a heart beating Valentine's day in Singapore
Unreal 4 learning notes - data storage using blueprints