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.42)

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
 
Depth Explosion
 

Figure 1 - Depth sprites being used to render explosions

The DepthExplosion sample demonstrates the use of depth sprites for rendering explosions. Depth sprites, like billboards serve the purpose of simplifying the rendered scene by rendering 2D images oriented towards the viewer instead of complex 3D models. The problem with the billboards is that they are flat images and when they intersect the scene geometry they cannot represent complex depth interaction of the object with the scene. The depth sprites solve this problem by overwriting depth values for the flat 2D billboard with pre-rendered depth stored in 2D image.

The DepthExplosion samples renders two instances of animated explosion, one using regular billboards and another one using depth sprites. The later looks much more realistic as it intersects scene geometry in non-planar way and looks like a highly tessellated object. In both cases just a single quad is used to render an explosion.

The sample uses 1.4 pixel shaders to render depth sprites with "texdepth" instruction. The "texdepth" instruction in 1.4 pixel shaders allows to overwrite polygons depth information with values computed in the shader as (r5.r / r5.g). The depth information for the drawn object is encoded in a texture and in case of this sample is a depth of a hemisphere. The sample computes depth scale and bias to place the sprite object in the proper place in the scene and passes those values through texture coordinate interpolators to the shader. The texture coordinate interpolators have higher precision than shader constants which allows for very fine control of depth values exported out of the pixel shader

 
The following keys are implemented. The dropdown menus can be used for the same controls.
DepthExplosion Controls
  • [ENTER] - Starts and stops the scene
  • [SPACE] - Advances the scene by a small increment
  • [F2] - Prompts user to select a new rendering device or display mode
  • Alt+[ENTER] - Toggles between fullscreen and windowed modes
  • [ESC] - Quit
 
Requirements

Download
 
 


 



©2009 Advanced Micro Devices, Inc.  |  Contact AMD  |  Careers  |  RSS Feeds  |  Terms and Conditions  |  Privacy  |  Trademark information  |  Site Map