7.3 C
New York
Saturday, November 15, 2025

rendering – Do GPUs re-draw a all of a personality’s vertices/triangles/fragments each body?


What you have stated is how most video games work, a minimum of at a logical stage. (In apply, these levels may not occur precisely sequentially – a GPU may be concurrently drawing some fragments whereas rasterizing others and remodeling vertices for the wave of triangles after that, and a cell tile-based GPU may work on one tile at a time fairly than rasterizing all triangles of the mannequin without delay. However the internet impact is identical as if these levels occurred in precisely that order.)

It is solely doable for a recreation to implement on-demand rendering, the place the code waits till one thing adjustments, after which asks the GPU to attract a brand new body solely when a change occurs (or, to be much more selective, solely re-drawing the half of the display screen the place one thing modified).

In apply although, plenty of video games have issues altering on a regular basis, even when it is one thing so simple as background/idle animations, so there’s little profit to implementing this type of selective rendering. That is very true in 3D video games, the place anytime the digicam is transferring, nearly each pixel on the display screen will change. The digicam tends to maneuver rather a lot throughout gameplay, so we’d like the method of re-drawing each pixel to be quick sufficient to occur each body if we wish to hold that movement easy. If we have already made it quick sufficient to do each body, then we would as properly do it each body, even when it isn’t strictly needed, fairly than add further problems into our code to avoid wasting that work. It is already a part of our body price range, so we would as properly spend it.

The one actual draw back is when operating off of battery, the place these redundant frames will drain the battery sooner than caching one picture till it wants to alter. So, in the event you’re making a recreation focused for cell units the place plenty of time is spent on screens the place little to nothing adjustments, then in that case it would repay to implement that logic to re-use frames when nothing is altering.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles