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
 
Multitexture Soft Shadows on Radeon®


Figure 1 - Soft shadow of vase
 

Figure 2 - Soft shadow texture
 
The sample RadeonSoftShadow demonstrates how to use multitexturing to generate soft shadows. The vase is drawn several times into render target textures from the light point-of-view in a dark gray silhouette over a black background. The light position is displaced for each sample to simulate a spherical light source. A shadow map texture is generated by cumulatively subtracting each render target sample from an initially all-white background. Overlapping silhouette regions become progressively darker as samples are subtracted. Regions with less overlap attain a lighter shade of gray, thus forming a gradation of gray across the shadow. The shadow map is projected onto the receiving surface using automatic texture coordinates and a texture transformation matrix. It is modulated onto the receiving surface with multitexturing.

On the Radeon® two sample textures may be subtracted at once using the three stage multitexture units. The two samples are added together using the first and second stage, and subtracted from the cumulative texture using the third stage. Multiple samples may be subtracted by applying this process recursively. Figure 1 shows the projected shadow texture. Figure 2 shows the generated shadow texture.
 
RadeonVaseSoftShadow Controls
  • [SPACE] - Advance Frame-by-frame
  • [ENTER] - stop advancing Frame-by-frame
  • [ESC] - Quit
 
Downloads
 
Note: The source code and media should be unzipped into the following recommended directory structure to ensure you can easily compile and run the executable.

Radeonxxxxxx.zip -> x:\atiddk\Direct3D\Radeonxxxxxx
media.zip -> x:\atiddk\media

RadeonSoftShadow.zip

media.zip


Back to Samples Page
 
 
 


 



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