![]() |
![]() |
![]() |
This tutorial demonstrates how to use the PIX tool to generate screen shots of rendered frames, and how to compare per-pixel rendering results for frames rendered on hardware abstraction layer (HAL) and reference device types (see Device Types). The tutorial is divided into the following tasks:
The PIX tool is located at:
(SDK root)\Utilities\PIX\PIXWin.exe
The Microsoft DirectX 9.0 software development kit (SDK) contains many sample applications that can be tested with PIX. Executable sample applications are located at:
(SDK root)\Samples\C++\Direct3D\Bin
This tutorial will typically take 10-15 minutes.
Create an experiment for taking a screen capture at frame 1000 of the ShadowVolume Sample. This will require that you modify the experiment's default trigger and default action.
Launch PIX (see Step 1: Start PIX). In the PIX File menu select New Experiment. Click More Options to go into the Advanced View. In the Trigger Type selection box, select Frame. You should see the following view:
The Advanced View (unlike the Basic View discussed in Gathering Data in the PIX Basic View) is designed to let you enter triggers and actions directly. The following procedure will allow you to capture a screen shot capture at frame 1000:
Now that you have your experiment set up, click Start Experiment. The following screen shot is generated:
The only supported PIX screen capture file format is .png, but the Texture File Converter Tool may be used to convert a .png file to other common formats.
Now rerun the experiment with a reference device. To do this, you will need to generate another action that switches the device to a reference device.
The experiment view should now look like this:
Once again, run the experiment by clicking Start Experiment. This will generate the following screen shot using the reference device:
You can view a per-pixel comparison of the screen shots to see how they differ between HAL and reference device types. Because the differences in the images are subtle, you can use the file comparison feature of PIX.
From the File menu, select Compare Images. The following user interface is displayed:
The resulting display shows the RGB differences between the corresponding pixels in each of the two original images: