当前位置:网站首页>Talk about my understanding of image tearing, vertical synchronization, freesync and g-sync
Talk about my understanding of image tearing, vertical synchronization, freesync and g-sync
2022-06-28 17:04:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
Recently, I have been exposed to graphics related knowledge , I felt like I was learning OpenGL There is no need to think about how the frame buffer is handled on the display , The drivers have helped me do it well , Now in contact vulkan When I found myself right Swapchain I don't know how this thing works , I found the knowledge point of vertical synchronization in the process of searching information on the Internet , I used to see it when playing games, but I didn't understand what it meant ( I'm sorry ! I am not a qualified gamer >-<), I think I still have to find out , So I sorted out my understanding of vertical synchronization and related concepts
To the body !
CRT It's a cathode ray tube display , In the traditional way CRT The display screen refreshes to see , His working method is to continuously read the data in a specific memory buffer from top to bottom from left to right to refresh the display on the screen , The renderer also updates the memory buffer to output dynamic pictures .
There will be a factor in the refresh rate of the display : With Hz In units of , It's usually 60Hz or 144Hz, Determined by the display , This is a relatively fixed value , There won't be much floating , Maybe the temperature will affect this frequency ( Monitor , Hardware decision ); There is also a refresh rate factor in the renderer : With FPS( Frames per second ) In units of , Because this refresh is controlled by the application , There will be many influencing factors , such as CPU,GPU Influence , The impact of algorithms , These will affect the time required to calculate a picture , This affects the frequency ( Applications and CPU,GPU, Mainly the procedure , The second is hardware )
So when the two frequencies are inconsistent , It is easy to have several problems :
1、 The picture is torn
What is picture tearing , Picture tearing is when the monitor displays a picture , There is one or more obvious “ Demarcation line ”, This is usually because the number of frames per second is higher than the refresh rate , It is possible that the display unit time shows 1 A picture , And the program has calculated the second frame , When the monitor refreshes the first frame to half , That is, the position in the middle of the frequency screen , The rest of the image has been replaced with the second frame by the application , No way out , The remaining half of the first frame has been discarded , The display can only display the lower half of the second frame and the upper half of the first frame together , There will be a clear dividing line , This is the tearing of the picture
FPS Synchronize with refresh rate
FPS The picture is torn above the refresh rate
2、 Skip frame
The principle is the same as that of picture tearing , Image tearing is just a part of a frame discarded during the display process , Frame skipping is just that one frame has been completely discarded
3、 Output delay
Both of the above problems are caused by FPS Above refresh rate , So the output delay is about FPS Below refresh rate , The monitor finds that the second frame of image has not been calculated after refreshing a picture , There is no way but to continue to display the contents of the first frame , Causing delays , Because it is possible to refresh the screen for the second time to half of the time , Here comes the second frame , This is another picture tear .
Output latency is a big headache , On behalf of you CPU、GPU Don't pass the test , Or the algorithm of this rendering program is too complicated , There is a special case that can be avoided FPS Tearing of the picture caused by too low , Is that when FPS Is the divisor of the refresh rate , Because it can be rounded up . This is probably why the display has chosen a refresh rate of 60Hz or 144Hz Why , Because they have so many divisors ,60 Altogether 11 A divisor ,144 Altogether 12 A divisor 60Hz:30Hz,20Hz,15Hz,12Hz,10Hz,6-1Hz 144Hz:72Hz,48Hz,36Hz,24Hz,18Hz,16Hz,12Hz,8Hz,6Hz,4Hz,2-1Hz
These problems occur because the two frequencies are inconsistent , So we need some means to make the two frequencies consistent or synchronized , There will be no such headache as performance waste and image tearing when it is useless
Vertical synchronization 、Freesync、G-Sync, There are three ways to synchronize (sync Understood as synchronous )
among Vertical synchronization It's early technology , At that time, there was no way to control the refresh rate of the display with an application program , So this synchronization is to control the frequency of frame output in the application to be the same as that in the display , The advantage of vertical synchronization over the other two technologies is that it is widely used , There is no case that the monitor cannot be used without frequency adjustment , Not limited by equipment .
Using vertical synchronization is actually in FPS Lower when the refresh rate is higher FPS, and FPS It is meaningless when the refresh rate is lower , There will still be problems when the frequency is inconsistent , So in FPS It is not recommended to enable vertical synchronization when the refresh rate is lower , In fact, it doesn't make much difference if you open it .
Freesync and G-Sync It is Vertical synchronization Of Upgraded version , After a period of vertical synchronization , A display appears that allows you to adjust the refresh rate , stay FPS Above the refresh rate, it is similar to vertical synchronization , But in FPS Below the refresh rate , He can Adjust refresh rate to FPS, You don't have to switch to and FPS equally , Just set it to yes FPS The multiple of can prevent the picture from tearing , The reason is mentioned above Freesync yes AMD Company technology , Than G-Sync Earlier G-Sync yes Nvidia Company technology ,G-Sync It's not free , Support G-Sync The price of the monitor will be higher than that of the support Freesync Your monitor is more expensive , If you are nvidia The loyal powder of , Of course you would choose G-Sync Right ,( Only children make choices , All I want , Manual funny ) The latter two are certainly different in implementation details, but the principle is the same
Let's summarize , These problems are due to FPS And the different refresh rates , The solution is to synchronize the two frequencies , This can avoid the waste of rendering too many and redundant images , It can also ensure the comfort and smoothness of the picture , Compared with the older technology of vertical synchronization ,AMD The company's Freesync and Nvidia The company's G-Sync These two technologies optimize vertical synchronization , Originally, it could only lower FPS To stay in sync , Now we can solve these picture problems by adjusting the refresh rate of the display
Say it again ,Freesync and G-Sync The range of technology adjusted refresh rate is not 1 To the maximum refresh rate , But there is a specified range
There are many references on the Internet , I won't list ^-^
Finally, I wish you all the best in your work
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/132773.html Link to the original text :https://javaforall.cn
边栏推荐
- RHEL6.4中使用Cacti+Spine监控远程主机
- PotPlayer播放百度云盘视频
- MySQL中的日志管理 日志备份与恢复
- Five solutions that give consideration to enterprise anti epidemic and development, from IBM
- Problems encountered in local deployment conflict: MySQL database code, isolation level and verification code are not displayed
- 如何让你的 WordPress 网站更安全
- Free, powerful and high-value note taking software evaluation: OneNote, heptabase, hydrogen graph, flowus
- 2019 CSP J2入门组 CSP-S2提高组 第2轮 视频与题解
- Please ask me, the queries written in my database account for 99%. Is it better to use pay as you go mode or reservation mode?
- 谈谈我对画面撕裂,垂直同步,Freesync以及G-sync的理解「建议收藏」
猜你喜欢

Gestion des journaux sauvegarde et récupération des journaux dans MySQL

知乎热问:一个程序员的水平能差到什么程度?

AutoSAR 软件开发培训

After the first failure, AMEC rushed to the Hong Kong stock exchange for the second time, and the financial principal changed frequently

PotPlayer播放百度云盘视频

中国SSD行业企业势力全景图

本地部署Confluence遇到的问题:MySQL数据库编码、隔离级别、验证码不显示
![[tcapulusdb knowledge base] tcapulusdb technical support introduction](/img/ae/9295c8ae642cde632d06966c28d342.png)
[tcapulusdb knowledge base] tcapulusdb technical support introduction

Cross cluster deployment of helm applications using karmada

ICML 2022 | 基于解耦梯度优化的可迁移模仿学习方法
随机推荐
如何将你的 WordPress 网站置于维护模式
Batchnorm2d principle, function and explanation of batchnorm2d function parameters in pytorch
Can Huawei become a "brother of lipstick" or a "Queen of goods"?
基于DataWorks的时效仿真平台|得物技术
Potplayer plays Baidu cloud disk video
「杰伦熊」暴跌96.6% 明星带货NFT为何遇冷?
如何备份 WordPress 数据库
This simple little function saves 213 hours for our production research team in half a year
logback 日志输出格式
MATLB|可视化学习(plot和bar)
如何清除 WordPress 中的缓存
Gestion des journaux sauvegarde et récupération des journaux dans MySQL
怎么期货开户?在哪里期货开户比较安全?
RHEL6.4中使用Cacti+Spine监控远程主机
Log management in MySQL log backup and recovery
彻底凉了!腾讯知名软件全线下架,网友一片唏嘘。。。
区间乘积的因子数之和
强化 WordPress 的 11 种有效方法
「科普大佬说」 智能仿生机器鱼
12 SQL optimization schemes summarized by old drivers (very practical)