ATI SDK

ATI Product Information

Support for Alternate OS's

Hardware partners

Software partners

RenderMonkey

Drivers


 
 

Highlights


GPU MeshMapper (V1.0)

GPU PerfStudio (V1.2)

Samples: CrossFire Detect (update)

Samples: PostTonemapResolve

The Compressonator (version 1.41)

GPU Shader Analyzer (V1.4)

RenderMonkey™
(version 1.81) (New)


ATI Compress (version 1.6)

AMD Tootle 2.0 (New)

AMD OpenGL ES 2.0 Emulator (V1.1) (New)

HLSL2GLSL (V0.9)

AMD at GDC 2007

ATI SDK


 
 
ATI Developer - Source Code
 
QueryLightFlare
 

Figure 1 - Light brightness determined by query results

This sample application uses the new asynchronous visibility query mechanism introduced in DirectX 9 to determine how bright to make a light flare (if it is to be drawn at all).  The blocking object (simple alpha tested maple leaves) is drawn first into the frame buffer.  A small sphere representing the light source is then drawn twice.

The first time the light source geometry drawn, it is drawn with Z-Writes OFF and Z-Test set to ALWAYS.  This draw call is bracketed with a visibility query so that the maximum number of pixels potentially visible for the light source this frame can be determined.

The second time the light source is drawn, it is drawn with Z-Writes turned back ON and Z-Test set back to LEQUAL.  This draw call is bracketed with a second visibility query so that the actual number of pixels visible for the light source this frame can be determined.

The application then spins waiting for the results of the visibility queries to return.  Ordinarily, an application would do useful work here or simply move on to the next frame, using some array or ring-buffer of queries to check for the results in subsequent frames (assuming that stale query data is OK, as it likely is for a simple light flare).

Once the two visibility queries have returned, the percentage of light source pixels actually visible in the scene is used to determine the brightness of the light flare which is drawn over the scene with no Z-test and additive blending.

 
QueryLightFlare Controls
  • L - Toggles the light source motion
  • [F2] - Prompts user to select a new rendering device or display mode
  • Alt+[ENTER] - Toggles between fullscreen and windowed modes
  • [ESC] - Quit
 
Requirements

Download
 
 


 



©2008 Advanced Micro Devices, Inc.    |    Contact AMD    |    Terms and Conditions    |    Privacy    |    Trademark information    |    Site Map