The COMPLETE Effect and HLSL Cross-Reference

By Sebastien St-Laurent
ISBN 0-9766132-1-2
Jan 2006 (896 pages)

Buy directly from Paradoxal Press at $20.75 (Save 43%)

Page 9

...values. The advantage of the vector architecture is that it allows processing of multiple values at the same time. By default, all . oating-point values are processed as 32-bit precision .oating-point numbers. The pixel shader speci. cation allows processing of 16-bit precision values, which can be ...

Page 15

...the #pragma preprocessor directive is def. This instruction serves to give the compiler some hints as to what some of the registers should contain on a speci. c compilation pro.le. Keep in mind that this is an optimization hint to the compiler, and the .nal decision as to how registers are used is a...

Page 211

break_comp Conditionally breaks out of a loop / endloop or rep / endrep block with a comparison. 3 Flow Control

Page 123

...ameters with the ID3DXEffectCompiler or ID3DXEffect interfaces. You can acquire a handle dynamically for example when you use the GetParameterByNamefunction. If you look at the handle de.nition above, youll notice that handles are technically string pointers. This means that in addition to dynamical...

Page 60

...approach is to create a new uniform coordinate system, which would be the same for every pixel on your object and from your normal texture can be built. To accomplish this, you need to consider that if your object was not bumped, the normal for each point on the surface would be perpendicular to the...

Texture Converter (Windows Explorer Extension)

The texture file converter saves one or more texture files to a new file format. The following are the available input and output formats:

For more information on these texture file formats, see D3DXIMAGE_FILEFORMAT.

Compatibility Chart

Direct3D 9Direct3D 9 EXDirect3D 1064-bit Native ModeWindows XPWindows Vista

Yes

No

No

Yes

Yes

Yes

Requirements

Minimum Operating SystemWindows 2000

Installation

The texture file converter is automatically installed from txview.dll when you install the DirectX SDK.

User's Guide

The texture file converter is activated when you right-click one or more files or a folder, and then select Convert to file format... from the context menu.

The following conversion dialog box will appear with options for output size, formats, filtering, and file location.

Texture conversion dialog box

If Image Options is set to Default, the original image size and/or mip levels will be retained. The Depth setting applies only to volume textures. Choices are available among the following options and filters.

Options and FiltersDescription
MiplevelsLevel of mipmap sampling. For more information, see Texture Filtering with Mipmaps.
Pixel FormatAvailable unsigned, signed, and mixed formats described in D3DFORMAT.
Image FilterD3DX_FILTER_NONE, _POINT, _LINEAR, and _TRIANGLE texture channel flags described in D3DX_FILTER.
MirrorD3DX_FILTER_MIRROR_U, _V, and _W texture channel flags described in D3DX_FILTER.
sRGBIn setting indicates the input data is in sRGB (gamma 2.2) color space. Out setting indicates the output data is to be in sRGB (gamma 2.2) color space.
Mip FilterD3DX_FILTER_BOX, _POINT, and _TRIANGLE texture channel flags described in D3DX_FILTER.
DitherOrdered (standard 4x4) or Error Propagation (statistically based) dither algorithms can be applied to the output from the Image Filter and Mip Filter. Alternately, no dithering can be applied.

Note    The Miplevels and Mip Filter choices are disabled unless .dds output format and Enable extended .DDS file options are both selected.

Behavior of the converter varies according to whether a single file, multiple files, or a folder have been selected, as described below.

Converting a Single File

Follow these steps to convert a single texture file.

  1. Right-click a texture file to convert, then select Convert to file format... from the context menu. The conversion dialog box shown above will appear.
  2. Insert a path, file name, and extension for the converted file. Alternately, click the ... browse button, which will open a Save As dialog box to select the converted file's name, format, and destination folder.

Converting Multiple Files

Follow these steps to convert multiple texture files.

  1. Select multiple texture files, right-click, and select Convert to file format... from the context menu. A bulk file dialog box appears.
  2. In the bulk file dialog box, select whether to specify the output format for each file individually, or to convert all files to the same output format.
  3. If you chose to specify the output format for each file individually, the conversion dialog box shown above appears in turn for each file. Then for each file, specify the output size, format, and filtering to apply. However, if you chose to convert all files to the same output format, a Bulk texture file conversion dialog box, similar to the conversion dialog box shown above, appears. Specify the output size, format, and filtering to apply to all the files you have selected.
  4. Select the output format for the files.
  5. Insert a path to a destination folder in which to store the converted files, or click the ... browse button to select a destination folder.

Converting Files in a Folder

Follow these steps to convert several texture files in a folder.

  1. Right-click a folder containing texture files (or several files and a folder), then select Convert to file format... from the context menu. A Bulk texture file conversion dialog box, similar to the conversion dialog box shown above, appears.
  2. Specify the output size, format, and filtering that will apply to all the files within the folder, along with any other files you have selected.
  3. Insert a path to a destination folder in which to store the converted files, or click the ... browse button to select a destination folder.
  4. If the destination folder is the same as or within the source folder, a message box will inform you that the files will not be converted. However, any other selected source files not in this destination folder will be converted. The converter also provides options for the case where more than one file of the same name will be created; for example, when two files to be converted have the same name but different extensions.