Overview

Sample Code

Programming Guide

API Reference

Support

8.0 Rendering effects


A rendering effect is an enhancement to a scene that is made in order to achieve a certain visual quality. Typically, rendering effects provide more than what can be produced by geometry and attributes alone. For example, Visualize might post-process a scene in a certain way in order to generate a shiny reflection or a bloomed specular highlight. Rendering effects will enhance a scene at the cost of performance, although many modern GPUs support advanced effects in hardware to reduce this burden.

8.1 Anti-alias

Anti-aliasing is a rendering technique used to diminish the effect of hard jagged lines by blending them with the color of the surrounding pixels. Visualize supports full-screen antialiasing for all hardware drivers. Using this feature will have no effect on other drivers, including print drivers. Anti-aliasing levels of 2x, 4x, and 8x are supported; 4x anti-aliasing is enabled by default.

[figure 8.1.a] A sphere rendered normally (left) and with anti-aliasing enabled (right)

Enabling anti-aliasing is a simple operation. However, setting the anti-alias sampling level must be done at the time of window creation and cannot be changed - it can only be enabled or disabled.

[snippet 8.1.a]
awok.SetAntiAliasCapable(true, 8); // enables 8x anti-aliasing for the window
awok.SetAntiAliasCapable(false); // disables anti-aliasing altogether - cannot be enabled later
// ...
// create window
// ...
mySegmentKey.GetVisualEffectsControl().SetAntiAliasing(true); // turns on anti-aliasing in an existing window
mySegmentKey.GetVisualEffectsControl().SetAntiAliasing(false); // turns off anti-aliasing in an existing window
awok.SetAntiAliasCapable(true, 8); // enables 8x anti-aliasing for the window
awok.SetAntiAliasCapable(false); // disables anti-aliasing altogether - cannot be enabled later
// ...
// create window
// ...
mySegmentKey.GetVisualEffectsControl().SetAntiAliasing(true); // turns on anti-aliasing in an existing window
mySegmentKey.GetVisualEffectsControl().SetAntiAliasing(false); // turns off anti-aliasing in an existing window

Anti-aliasing is normally handled by the graphics hardware. If the feature is not supported, Visualize will not fall back to software anti-aliasing - the window simply will not be anti-aliased. There is a slight performance penalty when using anti-aliasing. At this time, only full-screen anti-aliasing is available.