VolumeTexture
所属分类:3D图形编程
开发工具:Visual C++
文件大小:16KB
下载次数:22
上传日期:2008-06-05 13:44:56
上 传 者:
yaojunguang
说明: The VolumeTexture sample illustrates how to use the new volume textures in
Direct3D. Normally, a texture is thought of as a 2D image, which have a
width and a height and whose "texels" are addressed with two coordinate,
tu and tv. Volume textures are the 3D counterparts, with a width, height,
and depth, are are addressed with three coordinates, tu, tv, and tw.
文件列表:
VolumeTexture (0, 2006-12-15)
VolumeTexture\resource.h (1475, 2002-11-12)
VolumeTexture\volumetexture.cpp (12175, 2002-11-12)
VolumeTexture\VolumeTexture.dsp (5526, 2002-11-12)
VolumeTexture\VolumeTexture.dsw (549, 2002-11-12)
VolumeTexture\VolumeTexture.jpg (13941, 2002-11-12)
VolumeTexture\VolumeTexture.manifest (690, 2002-11-12)
VolumeTexture\VolumeTexture.sln (926, 2002-11-12)
VolumeTexture\VolumeTexture.vcproj (4466, 2002-11-12)
VolumeTexture\WinMain.rc (6731, 2002-11-12)
//-----------------------------------------------------------------------------
// Name: VolumeTexture Direct3D Sample
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
Description
===========
The VolumeTexture sample illustrates how to use the new volume textures in
Direct3D. Normally, a texture is thought of as a 2D image, which have a
width and a height and whose "texels" are addressed with two coordinate,
tu and tv. Volume textures are the 3D counterparts, with a width, height,
and depth, are are addressed with three coordinates, tu, tv, and tw.
Volume textures can be used for interesting effects like patchy fog,
explosions, etc..
Note that not all cards support all features for volume textures. For more
information on volume textures, refer to the DirectX SDK documentation.
Path
====
Source: DXSDK\Samples\C++\Direct3D\VolumeTexture
Executable: DXSDK\Samples\C++\Direct3D\Bin
User's Guide
============
The following keys are implemented. The dropdown menus can be used for the
same controls.
Starts and stops the scene
Advances the scene by a small increment
Shows help or available commands.
Prompts user to select a new rendering device or display mode
Toggles between fullscreen and windowed modes
Exits the app.
Programming Notes
=================
Volume textures are no more difficult to use than 3D textures. In this
sample source code, look for the vertex declaration (which has a third
texture coordinate), texture creation (which also takes a depth dimension),
and texture locking (again with the third dimension). The 3D rasterizer
interpolates texel values much as it would for 2D textures.
This sample makes use of common DirectX code (consisting of helper functions,
etc.) that is shared with other samples on the DirectX SDK. All common
headers and source code can be found in the following directory:
DXSDK\Samples\C++\Common
近期下载者:
相关文件:
收藏者: