当前位置:网站首页>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
边栏推荐
- Some books you should not miss when you are new to the workplace
- 圆心科技,很焦虑?
- Ripple effect of mouse click (unity & shader)
- Unity automatic pathfinding
- Pourquoi l'ordinateur n'a - t - il pas de réseau après l'ouverture du Hotspot win10?
- PWN入门(2)栈溢出基础
- Unity realizes rotation and Revolution
- 力扣589:N 叉树的前序遍历
- Generate a slice of mesh Foundation
- The difference between SVG and canvas
猜你喜欢

harbor api 2.0查询

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

Writing unityshader with sublimetext

PS1 Contemporary Art Center, Museum of modern art, New York

Free travel recommendation in Bangkok: introduction to the Mekong River in Bangkok

力扣209. 长度最小的子数组

A collection of errors encountered in machine learning with unity

Redis cluster concept

Solution to Autowired annotation warning

Li Kou 2049: count the number of nodes with the highest score
随机推荐
Connect to the database and run node JS running database shows that the database is missing
How to install win7 on AMD Ruilong CPU A320 series motherboard
Qos(Quality of Service)
Approaching history, introduction to the London Guard Museum
力扣292周赛题解
Pit of smoothstep node in shadergraph
Introduction to some representations, neighbors and degrees of Graphs
Collective system
Recommended cultural landmarks of these tourist attractions in Bangkok
圆心科技,很焦虑?
Force buckle 977 Square of ordered array
Solution to 293 problems in the week of Li Kou
【VCS+Verdi聯合仿真】~ 以計數器為例
【Paper】2019_ Distributed Cooperative Control of a High-speed Train
[control] multi agent system summary. 4. control agreement.
Thread safety and processing caused by multithreading
力扣589:N 叉树的前序遍历
Unity ontriggerenter does not call
Error about the new version of UE4: unavigationsystemv1:: simplemovetoactor has been deprecated
Winter vacation parent-child tour, these new york attractions are not only fun but also knowledge