Render queue

Everyone form an orderly line

A render queue is a list of the things that the game wish to draw. It is generated by the rendered frontend. It is common to have at least two queue's. One for the opaque meshes and one for the meshes that are transparent. Besides drawing the queue multiple times it can also be sorted.

Queue Types

Opaque

For the opaque sort on state changes and then for early-z in increasing distance.

Transparent

These need to be drawn in back to front order to cover each other correctly. So they need to be sorted on distance.

Shadowmap

A shadowmap queue holds the meshes that cast shadows from a specific light. If only static objects are part of the shadowmap it does not need to be generated again next frame. Static and dynamic meshes can be kept in separate queues so only the dynamic one need to be regenerated most of the time.

Queue Sorting

Minimizes state changes

State changes such as change of shaders or textures can be expansive on some systems.

Reference