Z Fighting Code Sample

Published: 02/09/2012, Last Updated: 02/09/2012

by Matt McClellan and Kipp Owens
Intel Corporation
Client Enabling Technology

Why Should I Care About This Code Sample?

This source code demonstrates how game developers can work around any Z fighting issue they may find. The sample source demonstrates several techniques for working around Z fighting issues in DirectX* 9.0.

Target Audience

Game developers
General interest developers

Sample Category

Complete project including source files, headers and executable.

Implementation Language


Operating Systems: Microsoft Windows* 2000 and Windows XP

Download Source Code

Whitepaper: Alternatives to Using Z-Bias to Fix Z-Fighting Issues

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804