Overdraw

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Created page with "Overdraw is a rendering term which refers to cases where the same output fragment is rendered multiple times. This occurs when multiple polygons in the scene overlap t...")
 
m
Line 3: Line 3:
 
There are two possible outcomes from any given instance of overdraw:
 
There are two possible outcomes from any given instance of overdraw:
 
*. The fragment is rendered. The full fragment processing cost is paid.
 
*. The fragment is rendered. The full fragment processing cost is paid.
** Especially for high-end materials such as those which use [[Parallax Occlusion Mapping]], this cost may be significant.
+
** Especially for high-end materials such as those which use [[Parallax Occlusion Map]]ping, this cost may be significant.
 
** But don't overlook this cost, even for lighter materials. It adds up fast.
 
** But don't overlook this cost, even for lighter materials. It adds up fast.
 
* The fragment is z-culled. A lesser cost is paid.
 
* The fragment is z-culled. A lesser cost is paid.

Revision as of 20:59, 18 October 2017

Overdraw is a rendering term which refers to cases where the same output fragment is rendered multiple times. This occurs when multiple polygons in the scene overlap the same fragment(s).

There are two possible outcomes from any given instance of overdraw:

  • . The fragment is rendered. The full fragment processing cost is paid.
    • Especially for high-end materials such as those which use Parallax Occlusion Mapping, this cost may be significant.
    • But don't overlook this cost, even for lighter materials. It adds up fast.
  • The fragment is z-culled. A lesser cost is paid.

The content creator has little say in which outcome occurs for any given instance of overdraw. This is very dependent on optimizations in the Engine (which will do its best, but which priorities correct results over fast outcomes) and the GPU hardware (which varies per manufacturer and per hardware generation).

Regardless of which outcome results, overdraw is bad. It wastes a lot of GPU time (which is typically the major bottleneck to per-frame performance) on processing something which will typically make no user-visible difference to the scene. It is typically worth incurring small costs elsewhere (for example, small increases to object polygon count) to reduce overdraw.

Specific Instances

It is assured that overlapping transparencies (such as particle effects, foliage, etc.) always lead to a worst-case result.

Overdraw involving Alpha-masked objects can also induce the slow path by touching a fragment but not writing to the z-buffer. Where the majority of the object is opaque, this typically sorts itself out after one or two passes, but in cases where there is a significant transparent area, a large number of overdraws may pass through the slow path before an opaque texel is hit and the fast path can be considered.

The multiple passes required to render blended ground textures counts as pure overdraw and is potentially very expensive. Ground texture blending should be avoided except where strictly required.

Personal tools