Download IRIS Performer™ Programmer`s Guide
Transcript
Chapter 13: Performance Tuning and Debugging Notes on Tuning for RealityEngine Graphics This section contains some specific notes on performance tuning with RealityEngine graphics. Multisampling Multisampling provides full-scene antialiasing with performance sufficient for a real-time visual simulation application. However, it isn’t free and it adds to the cost of some other fill operations. With RealityEngine graphics, most other modes are free until you add multisampling— multisampling requires some fill operations to be performed on every subpixel. This is most noticeable with z-buffering and stenciling operations, but also applies to blendfunction() and glBlendFunc(). Texturing is an example of a fill operation that can be free on a RealityEngine and isn’t affected by the use of multisampling. The multisampling hardware reduces the cost of subpixel operations by optimizing for pixels that are fully opaque. Pixels that have several primitives contributing to their result are thus more expensive to evaluate and are called complex pixels. Scenes usually end up having a very low ratio of complex pixels. Multisampling offers an additional performance optimization that helps balance its cost: a virtually free screen clear. Technically, it doesn’t really clear the screen but rather allow you to set the z values in the framebuffer to be undefined. Therefore, use of this clear requires that every pixel on the screen be rendered every frame. This clear is invoked with a pfEarthSky using the PFES_TAG option to pfESkyMode(). Refer to the pfEarthSky(3pf) reference page for more detailed information. Transparency There are two ways of achieving transparency on a RealityEngine: blending, and screen-door transparency with multisampling. Blended transparency, using the IRIS GL blendfunction() routine (or the OpenGL glBlendFunc() equivalent), can be used with or without 476