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
 
Bubble Shader
 

Figure 1 - Vertex and Pixel Shading

The bubble sample demonstrates the use of vertex and pixel shaders to procedurally generate a pulsating soap bubble.
Rendering bubbles is an excellent candidate for vertex and pixel shaders because they are dynamic, reflective and partially transparent.

The Bubble sample creates a soap bubble effect by rendering a dynamically deforming sphere with a base texture and cubic environment map.

The vertex shader uses four sine waves traveling in different directions over the surface of the bubble to perturb the vertex position in the direction of the normal. In order to perturb the normal, cosine waves traveling in the same four directions are used. In order to provide a consistent looking warping across vertices, the tangent and bi-normal are used to guide the direction of the sinusoidal warp.

The pixel shader uses the brightly colored rainbow film map as a base texture. This texture map is meant to simulate the soap film appearance of a bubble. The environment map is modulated with this texture. The white highlights are stored in the alpha of the environment map as a glow map, and are linearly interpolated into the result. The final alpha value used for blending with the frame buffer is the fresnel term plus the glow map.

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


 



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