Gradient transparency and color artifacts

From DISE KnowledgeBase

Jump to: navigation, search

The sharp-eyed user might note that gradient transparency and color is not perfectly symmetrical. The upper-left corner and lower-right corner of an object is rendered correctly, while the lower-left and upper-right corner has minor artifacts at high contrast values. The reason for this is how a square object is created and rendered on the graphics card.

A graphics card almost always works on triangles. When asked to render a square object, the graphics card will break it down into two triangles. The lower-left corner and the upper-right corner will be shared by both triangles. Then, we ask the graphics card to make a smooth gradient between the objects corners. The gradient will be almost perfect on a triangle, but the hardware works only on one triangle at a time and the result is that the gradient of the two triangles does not match, since the "last" corner is not taken into account.

All objects in DISE are rendered as square objects (quads), which means that this behavior affects all DISE objects. This behavior should not cause any problems in most cases, but try not to use too high contrast in the lower-left or upper-right corners in comparison to the other two.

The upper-left and lower-right corners renders as they should, since they belong to only one triangle.

DISE2010GradientArtifacts1.png

DISE2010GradientArtifacts2.png

In the above picture you can clearly see the difference in symmetry between the two triangles building up the square. The difference only become noticeable with high-contrast colors.