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
 
HLSL_FX
 

Figure 1 - A few different HLSL shaders illustrated by this example

This sample application illustrates the use of the DirectX® 9 High Level Shading Language through the D3DX Effects framework.

For a detailed look at HLSL and some of the effects shown in this sample, be sure to tune in live for the NetSeminar "High Level Shading with DirectX® 9 on the ATI Radeon® 9700" on 11 December 2002 at 11am Pacific time.  This event will also be archived for six months so that you can tune in at a later date.

All of the techniques used by this application are kept in a single file: HLSL_FX.fxl.  There are several techniques (such as asm_wood and hlsl_wood) which are implemented in both assembly language and high level shading language.  These can be useful for comparative purposes and also to show how to utilize a mix of assembly and HLSL shaders in the same effect file.  Several other effects such as hlsl_velvet, hlsl_bluemarble and hlsl_gooch are implemented as HLSL-only effects and were ported to DirectX® 9 HLSL from publicly available RenderMan surface shaders.

One lesser-known feature of the HLSL that many developers have asked about is the ability to bind a particular high-level constant to a specific hardware constant register.  This is illustrated in the HLSL_FX effect file by the following code:

VECTOR lightWood : register (c2); // xyz == Light Wood Color, w == ringFreq
VECTOR darkWood  : register (c3); // xyz == Dark Wood Color, w == noise amplitude
VECTOR g_Leye    : register (c4); // xyz == L_eye, w == trunkWobbleAmplitude

 

This results in the lightWood variable being bound to hardware constant register c2, the darkWood variable being bound to hardware constant register c3 and the g_Leye variable being bound to hardware constant register c4.  This is not strictly necessary but can be nice when an application uses a set of constants over and over and wishes to minimize resetting constants between shader/effect/technique changes.

 
HLSL_FX Controls
  • Left Drag to rotate object
  • Right Drag to translate object in plane of screen
  • Middle Drag to translate object perpendicular to screen
  • [T] - Toggles motion of object relative to shader space position (Pshade)
  • [I] - Toggles text UI
  • [SPACE] - Toggles between asm and hlsl implementations (wood shaders only; others are always HLSL)
  • [TAB] - Switch to next parameter
  • [Shift] + [TAB] - Switch to previous parameter
  • Up/Down arrows - Adjust current parameter
  • Left/Right arrows - Switch constant colors (to match wood swatch)
  • [F5] - Refresh effects (nice for editing the .fxl file while app is running)
  • [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