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
 
Crystal / Candy Shader
 

Figure 1 - Vertex and Pixel Shaders

The crystal/Candy sample demonstrates the use of vertex and pixel shaders to create the effect of a very shiny semi-transparent surface such as crystal or a piece of hard candy.
The vertex and pixel shaders implement a cubic environment map to provide the reflections, a bump map to provide some detail, a Fresnel term to control opacity, and a base map to provide the surface color.


The Crystal/Candy sample renders a model of a head with predefined texture coordinates, normals and tangents. The cubic environment map, texture map, and bump map are applied to this model.
The vertex shader for this effect is centered on computing the view direction. Additionally it will pass the tangent/texture space vectors along so that the bump map normal can be transformed into object space in the pixel shader.

The pixel shader for this effect is accomplished in two shader phases. The first phase computes the reflection vector used for the cubic environment map while the second phase composites the color from the dependent read with other maps. At the core of the shader is the environment mapping, which is sampled as a dependent read at the top of the second phase. The environment map is combined with a reflection color, the base texture, and a base color. The final opacity of the model is set to the computed Fresnel term.

 
The following keys are implemented. The dropdown menus can be used for the same controls.
Crystal Controls
  • V - Toggles the vertex shader
  • P - Toggles the pixel shader
  • Z - Toggles Z-buffering
  • [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