9
$\begingroup$

In this tutorial,

It is very often the case that triangles are rendered that share edges. OpenGL offers a guarantee that, so long as the shared edge vertex positions are identical, there will be no sample gaps during scan conversion.

1 What exactly are sample gaps during scan conversion?

2 Under what circumstances, will it happen?

3 Does it happen when the line cross the center of the fragment?

$\endgroup$
8
$\begingroup$

Sample gaps will occur if you don't do things "properly".

In OpenGL or D3D, assuming a consistent winding order, if you have triangles ABC and CBD, then when a sample point - that is a test during scan conversion to determine if a point (read pixel) is inside a triangle - lies exactly on the shared edge BC, then that sample will belong to exactly one of those two triangles.

This avoids both gaps and double filling. The latter would be problematic with, say, translucency or stencil operations.

$\endgroup$
  • 2
    $\begingroup$ As an example two edge sharing triangles may perfectly splitting the same pixel in two but an OpenGL implementation shall guarantee only one of the triangles cover the pixel center. Which one is implementation dependent. $\endgroup$ – Andreas May 23 '16 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.