﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Shadow Seeker Home</title><link>http://www.cnblogs.com/wangdaniu/</link><description>Novice ShaderMan's Home</description><language>zh-cn</language><lastBuildDate>Tue, 07 Oct 2008 08:33:44 GMT</lastBuildDate><pubDate>Tue, 07 Oct 2008 08:33:44 GMT</pubDate><ttl>60</ttl><item><title>AMD R600 Architecture and GPU Analysis (zz from beyond3D)</title><link>http://www.cnblogs.com/wangdaniu/archive/2007/05/15/746831.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Tue, 15 May 2007 02:37:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2007/05/15/746831.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/746831.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2007/05/15/746831.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/746831.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/746831.html</trackback:ping><description><![CDATA[摘要: AMD R600 Architecture and GPU AnalysisPublished on 14th May 2007, written by Rys for Consumer Graphics - Last updated: 14th May 2007 Introduction Given everything surrounding the current graphics worl&nbsp;&nbsp;<a href='http://www.cnblogs.com/wangdaniu/archive/2007/05/15/746831.html'>阅读全文</a><img src ="http://www.cnblogs.com/wangdaniu/aggbug/746831.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42823/" target="_blank">[新闻]云计算硝烟四起 IBM携Bluehouse参战</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>NVIDIA G80: Architecture and GPU Analysis(zz from Beyond3D)</title><link>http://www.cnblogs.com/wangdaniu/archive/2006/11/09/555004.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Thu, 09 Nov 2006 02:48:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2006/11/09/555004.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/555004.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2006/11/09/555004.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/555004.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/555004.html</trackback:ping><description><![CDATA[摘要: We might as well take these first words in our look at NVIDIA's G80 graphics processor, the first GPU from any consumer graphics vendor that supports Windows Vista's Direct3D 10 (D3D10) component, to &nbsp;&nbsp;<a href='http://www.cnblogs.com/wangdaniu/archive/2006/11/09/555004.html'>阅读全文</a><img src ="http://www.cnblogs.com/wangdaniu/aggbug/555004.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42822/" target="_blank">[新闻]唱片商解密缘何反百度：态度强硬 人工干预明显</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>Graphics APIs in Windows Vista</title><link>http://www.cnblogs.com/wangdaniu/archive/2006/08/25/486258.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Fri, 25 Aug 2006 07:31:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2006/08/25/486258.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/486258.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2006/08/25/486258.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/486258.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/486258.html</trackback:ping><description><![CDATA[&nbsp;
<h1><span>Graphics APIs in Windows <st1:place w:st="on">Vista</st1:place></span></h1>
<p><i><span>By Chuck Walbourn, Software Design Engineer</span></i></p>
<p><i><span>Microsoft Game Technology Group</span></i></p>
<p><span>Windows&nbsp;Vista includes support for an entirely new display driver model that represents a major revision in the design of video drivers since the introduction of the Windows Driver Model (WDM) for Windows 98. This redesigned model reflects the evolution of video hardware from the world of 2D raster operations and GDI applications, to that of 3D games with fixed-function graphics hardware, to that of the modern programmable graphical processing unit (GPU) that supports a wide-range of high-performance graphics applications.</span></p>
<p><span>Windows Vista</span><span>支持了一个全新的显示驱动模型，该显示驱动模型体现了自从</span><span>Win98</span><span>引入</span><span>Windows</span><span>驱动模型（</span><span>WDM</span><span>）之后主要的变动。这个重新设计的模型反映了视频硬件从</span><span>2D</span><span>光栅化操作和</span><span>GDI</span><span>程序到使用固定管线图形硬件的</span><span>3D</span><span>游戏乃至现代支持大量的高性能图形程序的可编程图形硬件的发展过程。</span></p>
<h2><a name=ID0EGAA></a><span>Background</span></h2>
<p><span>The primary API for programming graphics since the early days of Windows has been the Graphical Device Interface (GDI). This API was designed to handle a plethora of 2D output devices and formed the basis for the Windows user interface experience. DirectDraw and Direct3D were introduced as alternative APIs to support full-screen games and 3D rendering as extensions to the existing hardware of the time. Interactions with GDI were complicated, and the effective intermixing of traditional GDI elements with Direct3D elements has been limited by this design. The Windows&nbsp;XP version of WDM, known as XPDM, reflects the side-by-side nature of GDI and Direct3D (see Figure 1).</span></p>
<p align=center></p>
<p><span>早期</span><span>Windows</span><span>的主要图形编程</span><span>API</span><span>是图形设备接口（</span><span>GDI</span><span>），它被设计用于操作大量的</span><span>2D</span><span>输出设备和组成</span><span>Windows</span><span>用户界面体验的基础。</span><span>DirectDraw</span><span>和</span><span>Direct3D</span><span>作为支持全屏游戏和三维绘制引入的可替换</span><span>API</span><span>引入，在当时是作为已存在的硬件的扩展。和</span><span>GDI</span><span>交互很复杂，并且这种设计限制了</span><span>Direct3D</span><span>元素和传统</span><span>GDI</span><span>元素的混合效果。</span><span>Windows XP</span><span>版本的</span><span>WDM</span><span>（就是</span><span>XPDM</span><span>）反映了</span><span>GDI</span><span>和</span><span>Direct3D</span><span>的这种状况（见图</span><span>1</span><span>）。<br></span></p>
<p><span>Over the years, the power of 3D video cards has grown dramatically to the point where the vast majority of hardware is dedicated to this function. A new driver model, Windows&nbsp;Vista Display Driver Model (WDDM), brings the GPU and Direct3D to the forefront, allowing the creation of an entirely new experience, the 3D desktop, that seamlessly blends the 2D world of GDI with the power of modern programmable GPUs. With WDDM, the video hardware is driven entirely by Direct3D, and all other graphics interfaces communicate with the video hardware via the new Direct3D&#8211;centric driver model (see Figure 2).</span></p>
<p><span>几年来，</span><span>3D</span><span>显卡的能力迅速增长，主流硬件一直致力于实现上述功能。一个新的驱动模型，</span><span>Windows Vista</span><span>显示驱动模型（</span><span>WDDM</span><span>）把</span><span>GPU</span><span>和</span><span>Direct3D</span><span>带到前台，允许创建一种全新体验，运用现代可编程</span><span>GPU</span><span>使</span><span>3D</span><span>桌面和</span><span>GDI</span><span>的</span><span>2D</span><span>世界实现无缝混合。使用</span><span>WDDM</span><span>，显示硬件完全由</span><span>Direct3D</span><span>驱动，其他所有和图形硬件进行交流的图形界接口都通过这个新的以</span><span>D3D</span><span>伟中心的驱动模型进行（看图</span><span>2</span><span>）。</span></p>
<p>&#160;</p>
<h2><a name=ID0EFAA></a><span>Direct3D 9</span></h2>
<p><span>Version 9 of DirectX was first released for Windows in 2002, with subsequent updates in 2003 and 2004. This API represents a decade of evolution of the DirectX technologies, the introduction of more powerful shader programming models for Direct3D, and a maturity backed by thousands of shipping titles. Direct3D&nbsp;9 is the primary graphics interface on Windows&nbsp;Vista, and it remains the ideal API to use for writing 3D games and applications that need to run on the broad range of existing hardware and Windows releases. The details of the new driver model are hidden from applications using the Direct3D 9 interfaces, but behind the scenes the operating system is taking full advantage of the new capabilities to provide true multitasking of the GPU, more efficient resource management, and robust performance.</span></p>
<p><span>DirectX</span>第<span>9</span>版<span>2002</span>年在<span>Windows</span>首先发布，在<span>2003</span>和<span>2004</span>年做了更新。该<span>API</span>代表了<span>DirectX</span>技术十年来的发展，它为<span>Direct3D</span>引入了更为强大的<span>Shader</span>可编程模型，为数以千计的厂商支持。<span>Direct3D9</span>是<span>Windows Vista</span>的主要图形接口，它保留理想的接口用作编写运行在大量已存在的硬件和发布的<span>Windows</span>版本上的<span>3D</span>程序和接口。新驱动模型细节被<span>D3D9</span>接口隐藏，但在幕后操作系统能够充分利用驱动模型的新特性去提供真实的<span>GPU</span>多任务，高效资源管理和稳定的性能。</p>
<p><span>To ensure full compatibility with older versions of Windows, some quirks of the old driver model must be emulated even with the new Windows Vista display driver model. For example, when a full-screen application loses focus, it must assume it has lost all the resources in video memory (VRAM) and reload those it created as unmanaged resources even though the new driver model handles the resources transparently without evicting them from the device context. Even the concept of a <i>managed</i> vs. <i>default</i> resource type is specific to the old driver model. Another example is the expectation of failure when allocating unmanaged (default pool) resources in excess of the amount of VRAM available, even though the new driver model can provide a nearly unlimited amount of virtual video memory. Because of these requirements, Direct3D applications running on Windows&nbsp;Vista will still receive these error conditions, and thus are limited in their ability to fully utilize some features of the new driver model using the basic Direct3D&nbsp;9 interfaces.</span></p>
<p><span>为了保证和老版</span><span>Windows</span><span>兼容，一些旧驱动模型的不良特性也会被新</span><span>Windows vista</span><span>显示驱动模型效仿。比如说全屏程序会丢失焦点，它会假设它丢失了显存（</span><span>VRAM</span><span>）中所有资源并重新导入以</span><span>unmanaged</span><span>格式创建的资源，即便新驱动模型直接管理资源而不需要从设备上下文中重新导入。</span><span>Managed</span><span>资源类型就是专为旧驱动模型定义的概念，对应</span><span>Default</span><span>类型。另一个例子是在分配</span><span>unmanaged</span><span>（在</span><span>default pool</span><span>）中的资源时，如果数量超过了显存大小，就会返回一个错误值，即便新驱动模型能够提供几乎无限的虚拟显存。因为兼容的要求，在</span><span>Windows Vista</span><span>上运行的程序仍然会收到这些错误条件，因此使用基础</span><span>Direct3D9</span><span>接口限制了它们充分利用新驱动模型特性的能力。</span></p>
<p><span>While new systems shipping with Windows&nbsp;Vista will include video cards with WDDM drivers, and new drivers for a number of popular video cards are included in the box, Windows&nbsp;Vista continues to support the ability to use older XPDM drivers for upgrades and corporate editions. On systems using the old driver model, Direct3D&nbsp;9 and older interfaces must be used, and the operation of the graphics system is very similar to that of Windows XP (Figure 1). WDDM is required for applications to use Direct3D 9Ex, Direct3D&nbsp;10, and later versions.</span></p>
<p><span>安装</span><span>Vista</span><span>的系统必须有具备</span><span>WDDM</span><span>驱动的显卡，</span><span>Vista</span><span>会自带一些流行显卡的驱动程序，同时也继续支持使用旧的</span><span>XPDM</span><span>驱动的升级和正式版本。在使用旧驱动模型的系统上必须使用</span><span>Direct3D9</span><span>其他旧接口，对图形系统的操作和</span><span>WindowsXP</span><span>类似（图</span><span>1</span><span>）。使用</span><span>Direct3D 9EX</span><span>，</span><span>Direct3D10</span><span>及其后继版本的程序要求使用</span><span>WDDM</span><span>。</span></p>
<h2><a name=ID0EEAA></a><span>Direct3D 9Ex</span></h2>
<p><span>The Direct3D 9Ex interface provides access to a slight extension of the standard Direct3D&nbsp;9 API that exposes the virtualized resource allocation, new <i>lost device</i> semantics, and some other new features available while running on Windows&nbsp;Vista. By creating this extended object, the Direct3D&nbsp;9 API uses the new semantics and therefore requires the application to use different logic (and therefore different code paths) for resource creation, management, and error handling for new kinds of conditions. This API is only available on Windows&nbsp;Vista, and it requires WDDM drivers. Because Direct3D 9Ex uses a separate API and driver code path than Direct3D&nbsp;9, supporting this API requires additional test cases for your application</span>。</p>
<p><span>Direct3D 9Ex</span>接口提供了对标准<span>Direct3D9 API</span>简单扩展的操作，包括虚拟资源分配，新的&#8220;设备丢失&#8221;语法和在<span>Vista</span>运行时的其他新特性。<span>D3D9</span>接口在扩展对象生成后可以使用新的语法并且需要程序使用不同的逻辑（和不同的代码路径）来在新条件下创建资源，管理资源和出错处理。该<span>API</span>只在<span>Vista</span>上可用，需要<span>WDDM</span>。因为<span>Direct3D 9Ex</span>使用和<span>Direct3D 9</span>不同的<span>API</span>和驱动代码路径，所以支持该<span>API</span>需要应用程序提供附加的测试程序。</p>
<p><span>The primary reason for creating the new Direct3D 9Ex API was to allow full access to the new capabilities of WDDM while maintaining compatibility for existing Direct3D applications. The new 3D desktop and many Windows Vista-specific applications make use of this version of Direct3D&nbsp;9, but they are not functional when running on older XPDM drivers. Because the Direct3D 9Ex API will never appear on older versions of Windows due to a lack of support for the WDDM, the standard Direct3D&nbsp;9 interfaces cover a much broader set of systems. For high-performance applications that can take advantage of the next generation of video hardware, the entirely new version 10 of Direct3D provides many new capabilities not exposed by Direct3D 9Ex. As a result, for games and most other applications, Direct3D&nbsp;9 or Direct3D&nbsp;10 is the recommended API.</span></p>
<p>创建新的<span>Direct3D 9Ex API</span>接口的主要目的是为了让用户能完全使用<span>WDDM</span>的新能力同时和已存在的<span>Direct3D</span>程序兼容。新的<span>3D</span>桌面和许多<span>Vista</span>程序用到了新版本的<span>Direct3D9</span>，但是在旧的<span>XPDM</span>驱动上无法运行。因为<span>Direct3D 9Ex</span>因为旧操作系统不支持<span>WDDM</span>而无法运行，标准的<span>Direct3D 9</span>接口使用的更广泛。对于能够使用下一代图形硬件的高性能图形程序，全新的<span>Direct3D 10</span>版本提供了更多<span>Direct3D 9Ex</span>没有提供的功能。对于游戏和其他大多数程序，<span>D3D9</span>和<span>D3D10</span>同时被推荐。</p>
<p><b><i><span>Note</span></i></b><span>&nbsp;&nbsp;&nbsp;&nbsp;The DirectX SDK does not provide samples, headers, or libraries for the Direct3D 9Ex interface. The MSDN Library and Windows SDK (formerly known as the Platform SDK) contain the available documentation, headers, and libraries.</span></p>
<p><span>For more information about Direct3D 9Ex, see <a href="http://windowssdk.msdn.microsoft.com/en-us/library/ms768038.aspx" target=_blank>DirectX for Windows Vista</a> on MDSN.</span></p>
<p>注意：<span> DirectX SDK</span>没有提供<span>Direct3D 9Ex</span>接口的例子，头文件和库。<span>MSDN</span>库和<span>Windows SDK</span>（就是从前的<span>Platform SDK</span>）包含了相应的文档，头文件和库。</p>
<p><span>Direct3D 9Ex</span>的更多信息请看<span>MDSN</span>上的<span>DirectX for Windows Vista</span>一节。</p>
<h2><a name=ID0EDAA></a><span>Direct3D 10</span></h2>
<p><span>To fully realize the potential of the new Windows&nbsp;Vista driver model and next-generation hardware, an entirely new version of the Direct3D API has been created. While WDDM eliminates some of the limitations on performance in the existing graphics system, Direct3D&nbsp;10 goes further by removing design bottlenecks in the existing Direct3D API and greatly simplifies the task of programming the GPU.</span></p>
<p>为了完全实现新的<span>Windows Vista</span>驱动模型和下一代图形硬件的潜能，一个全新版本的<span>Direct3D API</span>接口被创建了。因为<span>WDDM</span>剔除了一些当前图形系统上对性能的限制，<span>Direct3D 10</span>在移除当前<span>Direct3D API</span>设计瓶颈和简化<span>GPU</span>可编程任务方面走的更远了。</p>
<p><span>The new API completely eliminates all but a few fixed-function aspects, replacing them with programmable constructs and greatly streamlining the internal implementation. The hundreds of capability bits in previous versions of Direct3D have been completely eliminated and replaced with a well-defined, inclusive set of functionality that has only a few optional usage scenarios for specific resource formats. CPU-intensive resource creation and validation now have explicit semantics in the new API, allowing for much more predictable performance behavior and greatly reduced per-draw overhead. Resources can be reconfigured into multiple forms to allow efficient use at various stages, and the feature set imposes far fewer restrictions on usage scenarios for formats. There area also new block-compressed normal-map texture formats.</span></p>
<p>新的<span>API</span>接口几乎完全移除了固定管线功能，取而代之的是可编程构造器和极度流水线化的内部实现。数以百计的旧<span>Direct3D</span>版本的功能被取消，代之以明确定义的内部功能集合，它只有一些对特殊资源的可操作选项。<span>CPU</span>资源创建和生效在新<span>API</span>里有明确定义，使得用户能对性能进行进一步预估，大量降低了每次绘制的开支。资源能够被描述为不同类型使之在不同阶段都能被有效使用；新特性减少了对不同类型资源使用的限制，还包括了新的逐块压缩的法向图纹理格式。</p>
<p><span>In the new API, shader constants and device state are explicit resources, allowing for far more efficient caching on the hardware and greatly simplified driver validation. The programmable shader model has been unified across both vertex and pixel shaders, and made more expressive with a well-defined computational model and operator set. Also, a new geometry shader stage has been added to operate on primitives after the vertex shader stage. The results of the GPU&#8217;s work in the vertex and geometry shader stages of the pipeline can be streamed out to video RAM for reuse, allowing for the possibility of extremely complex multi-pass GPU operations with minimal CPU interaction.</span></p>
<p>在新接口中，<span>Shader</span>常数和设备状态是明确定义的资源，允许更高效的在硬件上缓存和简化驱动使用。可编程<span>Shader</span>模型把<span>VS</span>和<span>PS</span>统一在一起，使用明确定义的计算模型和操作集合，使之更具表现力。同时，一个新的<span>GS</span>阶段被引入在<span>VS</span>之后做逐图元操作。<span>GPU</span>在<span>VS</span>和<span>GS</span>阶段工作的结果可以输出到显存中被再次使用，这使得使用最小的<span>CPU</span>交互实现极度复杂的多遍<span>GPU</span>操作成为可能。</p>
<p><span>All of these enhancements enable next-generation graphics technology and expand the ability of applications to off-load work to the GPU. Offloading allows more complex GPU-based character skinning, accelerated morphing techniques, shadow volume generation and extrusion, particle and physics systems that are entirely GPU-based, more complex materials combined into efficient large-draw batches, procedural detailing, real-time ray-traced displacement mapping, single-pass cube-map generation, and many more techniques&nbsp;— all while freeing up CPU resources for more complex applications.</span></p>
<p>这些性能的强化使得下一代<span>GPU</span>技术得以使用，并且扩展了应用程序把工作托付给<span>GPU</span>的能力。<span>GPU</span>能够被托付完成更复杂的基于<span>GPU</span>的表面细节，加速变形技术，<span>Shadow Volume</span>生成和抽取，完全基于<span>GPU</span>的粒子和物理系统，更复杂的材质合成，过程细节，实时光线跟踪，替换贴图，单<span>pass</span>立方纹理生成和其他更多的技术——在此同时解放了<span>CPU</span>资源用以运行更复杂的程序。</p>
<p><span>To provide this level of innovation in Direct3D&nbsp;10, older hardware cannot be expressed as a partial implementation of a new interface. A video card is either capable of supporting all of the new features, or it&#8217;s not a Direct3D&nbsp;10&#8211;capable card. Therefore, while Direct3D&nbsp;9 could drive DirectX7-era hardware with many missing capability bits and usage limitations, Direct3D&nbsp;10 only works on a new generation of video cards. For an application to support older video hardware, it must also support the Direct3D&nbsp;9 interfaces.&nbsp; Future versions of Direct3D will build on version 10, extending it to new versions of the API while ensuring a strict superset of Direct3D&nbsp;10 functionality.</span></p>
<p>为了体统这个层次的<span>Direct3D 10</span>的功能，旧的硬件可以被表现为新接口的部分实现。显卡可以是支持所有<span>D3D10</span>特性的，或者不是一个完全支持<span>D3D10</span>的卡。同时，和<span>D3D9</span>能够驱动<span>DX7</span>时代硬件但是会丢失很多新特性和受到使用限制不同，<span>D3D10</span>之在新一代显卡上工作。对于想支持旧显卡的程序，它必须支持<span>D3D9</span>接口。将来的<span>Direct3D</span>将基于<span>DX10</span>，扩展后的新版本接口会确保成为<span>D3D10</span>功能的一个严格的父集。</p>
<p><span>For more information about Direct3D&nbsp;10, see the DirectX SDK documentation for DirectX 10.</span></p>
<p><span>D3D10</span>的更多信息参见<span>DirectX SDK DirectX10</span>文档。</p>
<h2><a name=ID0ECAA></a><span>OpenGL</span></h2>
<p><span>Windows&nbsp;Vista provides the same support as Windows&nbsp;XP for OpenGL, which allows video card manufactures to provide an installable client driver (ICD) for OpenGL that provides hardware-accelerated support; note that newer versions of such ICDs are required to fully support Windows&nbsp;Vista. If no ICD is installed, the system will fall back to the OpenGL v1.1 software layer in most cases.</span></p>
<p><span>Windows Vista</span>对<span>OpenGL</span>提供了和<span>Windows XP</span>一样的支持，允许显卡厂商提供可安装的<span>OpenGL</span>客户端驱动（<span>ICD</span>），以提供硬件加速支持。注意更新版本的<span>ICD</span>需要完全支持<span>Windows Vista</span>。如果没有安装<span>ICD</span>，系统在许多情况下会回到<span>OpenGL1.1</span>软件版本。</p>
<h2><a name=ID0EBAA></a><span>Application Compatibility, GDI, and older versions of Direct3D</span></h2>
<p><span>The Windows&nbsp;Vista graphics system is designed to support a broad range of hardware and usage scenarios to enable new technology while continuing to support existing systems. Existing graphics interfaces, such as GDI, GDI+, and older versions of Direct3D, continue to work on Windows&nbsp;Vista, but are internally remapped where possible. This means that the majority of existing Windows applications will continue to work.</span></p>
<p><span>Window Vista</span>图形系统被设计为支持大量硬件和各种使用环境下使用新技术同时支持已存在的系统。已存在的图形接口，比如<span>GDI</span>，<span>GDI+</span>和旧版<span>Direct3D</span>会继续在<span>Windows Vista</span>下工作，但是会在内部被重新映射到不同可能实现它们的区域。这意味这当前大多数<span>Windows</span>程序在<span>Vista</span>下能够继续工作。</p>
<p><span>Windows&nbsp;Vista continues to support the same Direct3D and DirectDraw interfaces as Windows&nbsp;XP, back to version 3 of DirectX (with the exception of Direct3D&#8217;s Retained Mode, which has been removed). Just as with Windows&nbsp;XP Professional x64 Edition, 64-bit native applications on Windows&nbsp;Vista are limited to Direct3D9, DirectDraw7, or newer interfaces. High-performance applications should make use of Direct3D&nbsp;9 or later to ensure that they have the closest match to the hardware capabilities.</span></p>
<p><span>Windows Vista</span>和<span>Windows XP</span>一样继续支持相同的<span>Direct3D</span>和<span>DirectDraw</span>接口，一直支持到<span>DirectX 3</span>版本（包括期望中的<span>Direct3D</span>中的保留模式，已经被移除了）。就像<span>Windows XP</span>专业<span>x64</span>版，<span>Windows Vista</span>上的<span>64</span>位程序只限制在<span>Direct3D9</span>，<span>DirectDraw7</span>或者更新的接口上运行。高性能程序应该使用<span>Direct3D 9</span>或者它的后继版本以保证它和硬件能力更为匹配。</p>
<h2><a name=ID0EAAA></a><span>Recommendations</span></h2>
<p><span>Consider the following recommendations when selecting an API for your graphical application:</span></p>
<ul type=disc>
    <li><span>Use Direct3D&nbsp;9 if your application must support Windows&nbsp;XP or an earlier version of Windows. </span></li>
    <li><span>Use Direct3D&nbsp;9 if you want to support Windows&nbsp;Vista running with XPDM drivers and upgraded systems that lack Direct3D&nbsp;10&#8211;capable hardware. </span></li>
    <li><span>Use Direct3D&nbsp;10 to take advantage of the next generation of video hardware on Windows&nbsp;Vista </span></li>
</ul>
<p>当为你的图形程序选择<span>API</span>时，考虑下列建议：</p>
<p>当你程序必须支持<span>WindowsXP</span>或者更早版本<span>Windows</span>时推荐使用<span>Direct3D9</span></p>
<p>当你想在<span>Windows Vista</span>上使用<span>XPDM</span>驱动运行程序和和在升级后但是缺少<span>Direct3D10</span>能力硬件的系统上运行程序时，推荐使用<span>Direct3D9</span>。</p>
<p>使用<span>Direct3D10</span>在<span>Windows Vista</span>上使用下一代显卡的新特性。</p>
<img src ="http://www.cnblogs.com/wangdaniu/aggbug/486258.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42821/" target="_blank">[新闻]国外媒体评出史上十大悬疑网络犯罪</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>PPU时代来临——AGEIA物理加速卡全面解析(zz</title><link>http://www.cnblogs.com/wangdaniu/archive/2006/08/22/482983.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Tue, 22 Aug 2006 01:34:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2006/08/22/482983.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/482983.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2006/08/22/482983.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/482983.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/482983.html</trackback:ping><description><![CDATA[<table cellSpacing=0 cellPadding=3 width="100%">
    <tbody>
        <tr bgColor=#ffffff>
            <td class=tpc_content colSpan=2><b>[3D加速后又一全新理念]<br></b>3D显卡的诞生令人们可以通过显示设备领略到&#8220;十分真实&#8221;的画面，在1996年，几乎所有市面上出现的显卡产品都宣称拥有一定的3D处理能力，不过当时它们大多只是通过显卡芯片完成常规画面渲染工作，而3D场景模型构建和光照效果运算都是通过专门的软件算法由CPU来处理。包括当时的API也没有统一的标准，实际的3D效果可谓十分有限。不过1997年，随着第一块3D加速卡Voodoo的问世，人们才终于领略到真正的3D游戏画面。在那个只靠CPU来完成大量图形计算的时代，Voodoo让人们见识到了3D加速技术的魅力，各种滤镜效果、性线过滤、抗锯齿等3D特效技术把3D游戏的画面提高到了一个全新的层次，人们也才清楚3D加速的概念。1998年第一款GPU芯片GeForce256出现后，其内置的硬件T&amp;L（几何转换和光源处理）引擎，可以直接完成场景构建和光照运算，大幅提升了显卡3D性能并降低了CPU的负担，从此人们有了完整的3D加速引擎的概念。这一次3D加速革命，也为图像处理技术的发展指明了方向，同时也造就今天的nVIDIA、ATI等著名厂商。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170022_78362.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170022_78362.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>但是，从此之后显卡就再也没有什么革命性的进展。在这漫长的10年之中，一代又一代的显卡芯片除了频率不断提升、制造工艺改进、渲染管线增加之外，并没有任何质的改变。只是从架构上来看，即便是目前最高端的7900GTX和X1900XTX，在架构上和他们的老前辈也并没有什么区别。<br>而现在的大型3D游戏中，为了使游戏的画面更加的真实，开发人员就会在游戏中设计许多接近现实的物理计算，比如：自由落体，物体运动，空气流动，力的反弹以及各种物体间碰撞等等。但是在传统的计算机中，游戏的物理运算基本上是通过物理引擎加上CPU处理后的物理参数后再反馈到中游戏之中，这种方式往往在遇到大规模的物理运算时就会出现运算瓶颈，这也就造成了游戏中一旦出现大量物理运算时，帧数就会明显下降。那么如果来解决这个问题呢，在Game Developers Conference （GDC）2005游戏开发者大会上，一家来自美国的半导体生产厂商AGEIA给我们一个非常好的答案——PPU。<br><br><b>[PPU——物理加速引擎]<br></b>PPU——Physics Processing Unit（物理运算处理器），如果CPU是为了达到更快的运算速度，GPU是为了达到更好的图像效果，那么PPU就是为了使游戏更加真实。在以前的3D游戏中，大多数的背景和物体都只是一些静态的贴图效果，真实感较差。而在FPS游戏大作Half Life 2（半条命2）中，Havok物理引擎带给了玩家们一个非常真实的物理世界。你可以在游戏中捡起一个废纸盒，然后把它抛向远处，然后可以看见它撞击到墙壁以后反弹到上地面上，溅起一阵灰尘。接近于真实物理效果使得游戏中任何物体都是可移动的，它们都遵守着游戏中的物理参数，组成了一个&#8220;真实&#8221;的游戏世界。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170332_14097.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170332_14097.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>PPU的出现可以说为图像处理技术的指明了新的方向，显卡并不再是像以前一样只是单一的工艺进步、频率提升、管线堆叠，而是需要采用不同方式的处理技术。加入了PPU负责单独的物理运算后，GPU便可以专心负责进行图像的渲染和显示，CPU则进行两者之间的综合协调。PPU的出现将物理计算和图像处理分开运算可以创造出更加生动的和真实游戏环境，这可能引领新一轮的3D技术革命。而玩家也将体验到像电影中的一样的壮观场面，各种物体爆炸、撞击、建筑物倒塌等等。有了PPU的辅助以后，可以很轻松的实现各种复杂的碰撞或者运动效果。这种小到一粒沙也会因为空气的流动而移动的场面，令游戏的可玩性、真实性是以前传统的任何一款3D游戏难以比拟的。<br>但是同时PPU有着和GPU完全不同的内部构架，PPU将拥有软、固质体动力，泛用碰撞侦测，有限元素分析，流体动力，毛发模拟，布料模拟等技术特效。PPU的这些处理技术和GPU是完全不同的两个运算概念，因为物理运算需要十分强大的整数及浮点运算能力，GPU的性能则是将重点放在了画面的渲染效果上，追求单纯的视觉效果，而PPU所强调的是&#8220;真实性&#8221;。<br>如此真实的表现真是令人期待，下面我们就先来了解一下全球首款硬件加速物理运算处理器，来自AGEIA的PhysX。<br><br><b>[PhysX横空出世] <br></b>2005年3月19日，美国无晶圆半导体厂商AGEIA于游戏开发者论坛（Game Developers Conference, GDC）上发表了全球第一款采用硬件加速的物理运算处理器(PHYsics Processing Unit, PPU),同时将其命名为PhysX。AGEIA称它将会出现在下一代包括PC和游戏主机中。 <br>AEGIA在发布PPU时这样解释：以90年代末被称为GPU的图形处理器为例，早期复杂的3D图形往往需要通过软件配合CPU的运算才能得以实现，而GPU的出现正好接过了CPU的这部分工作，我们的PC开始通过GPU完成对3D图形的运算，当然它并没有完全脱离CPU。AEGIA认为GPU的出现降低了CPU的工作负担，同时为用户提供了更加完美视觉效果和图形效果，而PPU的出现也是如此，它将原本必须依赖软件技术并通过CPU的运算才能完成的工作交给专门负责物理运算的硬件来完成，这样，PPU开始向CPU、GPU一样进入我们的PC。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170409_49919.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170409_49919.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>游戏性能三种重要因素:CPU、GPU和PPU(物理运算处理器)。<br>PhysX在游戏画面上带来一些较为显著的改变包括：<br>由于爆炸所引起的烟尘和碎片的效果 <br>通过制造更加复杂、节点更多的几何图形来形成更为逼真、交互性更强的动作 <br>包括人物的服装、眼泪等细节都会和真实的场景一模一样 <br>当风吹过衣物、或者树叶之类时，物体会呈现出自然的摆动 <br>环绕在物体周围的浓烟&amp;尘雾将会形成一种运动的效果<br>在今年的E3大展上，AGEIA也首次公布了PhysX的PPU Demo，在第一个Demo场景中，约有4200个多边型石块从一个山坡上滚下来，在运动的过程中，每块石头都以不同的物理条件自由下落，石头会因为高度、速度、重力及撞击而改变运动规则，它创造的完全是一个&#8220;真实&#8221;的客观世界，不再是以前游戏中每个物体的移动都是按照计算好的路线进行运动。既然需要拥有如此强大的物理运算能力，那么拥有强大性能的双核心CPU是否会更少的依赖PPU的工作呢？ AGEIA则认为PPU的作用是无法替代的。因为目前的CPU在游戏中可以处理1000个左右的可自由移动的多边物体，而目前的PPU可以达到32000个，如果驱动程序升级改进以后，可以达到40000～50000个。所以说PPU在游戏中物理运算的重要地位是难以替代的。<br><b>[关于AGEIA]<br></b>在05年GDC上，一家名不见经传的美国半导体设计厂商Ageia发表了世界上第一颗采硬件加速物理运算处理器（Physics Processing Unit, PPU）&#8220;PhysX&#8221;，很快在世界上引起了一场物理加速的轩然大波。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170600_53995.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170600_53995.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>AGEIA的计划主要推广该公司的软件产品physics API，该软件起初被称之为Novodex，但是后来被更名为PhysX。<br>根据AGEIA公司的设想，PPU和CPU以及GPU的关系成为一个相辅相成，共同运算的关系由于PPU能够代替CPU进行大部分的物理计算任务，因此可以使得处理器能够更加快速得与GPU进行数据交换从而使得游戏运行更加平稳。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170619_57505.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170619_57505.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170625_29342.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170625_29342.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>为了给游戏开发商提供便利，AGEIA公司准备了NovodeX SDK开发包来完成这个使命。该软件不但包含了业界先进的Novodex物理模拟引擎，而且它还可以作为现在主流的的3D建模开发工具以及微软的XNA开发工具的插件运行，开发人员只要通过拖放和点击就能完成对目标施加物理模拟效果，这对于任何专业的开发人员将都不是什么难事。　Ageia早先表示只要游戏开发商支持PhysX物理卡，就可以免费使用PhysX物理引擎和其它相关的技术支持。这吸引了许多一线游戏包括幽灵行动3、X战警2-天启降临、City of Villians等的开发商，虚幻3也将支持PhysX物理卡并使用PhysX引擎，这意味着将来众多的虚幻3引擎游戏都将同时支持PhysX。<br>Ageia公司的创始人一共有五位，他们是在美国一家名为MinMax technologies的半导体设计公司们共事相识的。当时团队研发了业界第一块基于网络处理器的大型交换机，当完成这个项目后，他们几个人聚在一起决定开创自己事业，于是就有了现在的Ageia公司。新公司首先研发了业界首款三芯片10 Gps数据处理能力的网络处理器，接下来他们决定尝试一些能带来更大影响力和革命性的东西，于是就有了今天的&#8220;PhysX&#8221;。<br><br><b>[物力加速的全盘解决方案]<br></b>随着游戏画面的发展、电脑AI的更加复杂化，再加上物理运算已经使CPU不堪重负，因此业界除了AGEIA外，其它一些有实力的厂商当然不会作壁上观。目前业界的解决方案有3种：物理引擎专业商Ageia制造独立的PhysX物理加速卡； Nvidia同Havok协力研究的&#8220;SLI物理卡&#8221;加速技术；ATI则在加紧研究提高其显卡的物理运算能力，三种方案虽然都能够提供物理加速，但是在技术上又有很大不同。<br>Ageia推出革命性的PhysX物理卡并制订了长远的计划来同时发展软件的PhysX物理引擎和硬件的PhysX物理卡。软件的PhysX物理引擎在PC、PS3和XBOX360上都有广泛运用，例如半条命2中运用的rag dolls(布娃娃)物理引擎等。<br>硬件的PhysX物理卡则是IT业界的一项革命，独立的物理卡要比CPU和GPU模拟物理运算更快更专业，先前Ageia用PhysX物理卡展示了一款8人对战游戏，游戏中有数百个目标你可以把它们移动、毁灭，每一个物体的位置、外型并不是事先设计好，而是实时运算出来的。同时计算数千个物体的活动轨迹和破碎画面，过去是CPU和显卡所无法负担的。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605170831_23010.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605170831_23010.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><b>[物理加速——NVIDIA篇]<br></b>NVIDIA提出了&#8220;SLI物理卡&#8221;的概念，这项技术由NVIDIA和Havok共同研发。Havok是一家专业的物理引擎设计公司，许多著名的游戏如帝国3、半条命2、F.E.A.R、光晕2等都使用了其Havok物理引擎。去年10月，Havok宣布最新的物理引擎Havok FX即将完成，这也正是NVIDIA &#8220;SLI物理卡&#8221;的技术基础。<br>Havok FX物理引擎，其是可以让任何支持Shader Model 3.0的显卡极大提高物理运算能力的开发软件。现在Havok FX的BETE版已经面世了，正式版将于夏季发布。Havok还没有透露该API的详情，但表示使用Havok FX技术后，NVIDIA显卡将可以加快电脑物理运算的速度。NVIDIA首席科学家David Kirk称：让GPU负责物理计算是适合的，目前GPU的速度和高可编程性完全可以兼顾物理运算。游戏开发商通过GPU上各种高级的可编程资源，在GPU上进行并行模拟运算得到了良好的结果。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171044_39583.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171044_39583.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171054_16693.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171054_16693.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>目前NVIDIA正在与Havok共同研究Havok FX引擎与显卡的兼容性。虽然Havok FX只需要一块显卡就可以运行，但NVIDIA希望研究出基于SLI技术的更强物理引擎：2块NVIDIA显卡通过SLI主板互连，在不需要太多物理运算的游戏中以普通SLI模式运行；在大量物理运算需要的游戏中则划分一块显卡专门负责物理运算，或者由2块显卡动态分配任务。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171120_67142.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171120_67142.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>显然NVIDIA计划借此次物理卡的浪潮同时扩大在主板、显卡、物理卡3个领域的影响力，因为要实现&#8220;SLI物理卡&#8221;必须购买2块NVIDIA显卡和1块NVIDIA SLI主板，而不需要Ageia的PhysX物理卡。<br><br><b>[物理加速——ATi篇]<br></b>Havok FX只需要支持Shader Model 3.0的显卡，而不是仅为NVIDIA显卡可用。所以ATI将来也可以同样提出基于CrossFire的互连方案。ATI称其在动态渲染管线分配技术的领先、与Microsoft在DX10技术的紧密联系等优势会让ATI比竞争对手更强大。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171212_37166.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171212_37166.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>ATI称其R520和R580架构本身具备物理处理功能，该功能可以通过软件方式达到。不久ATI就会给各软件开发商提供新的API以改进Pixel shader，新的DPP(并行数据处理)技术将使显示芯片绕过Direct3D API，同步处理物理数据和pixel shader数据。ATI称这一改进将在让GPU加强物理运算能力的同时还可以极大的提高GPU运算所有浮点指令的速度，这一多用途的改进方案将使ATI显卡在流体处理、视频处理等多方面受益。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171233_99762.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171233_99762.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>Havok FX将物理数据转换为Direct3D数据，从而使任何Shader Model 3.0显卡都可以直接运算。而ATI的最新API可以让开发商使用GPU来加强运算多种物理或浮点数据，从而直接运算物理数据。开发人员可以开发出多种软件使显卡加强不同能力来应对不同运用。这种高自由的开放性API使它受到了欢迎。但是ATI的这一方案也需要专门的开发团队支持，如果是拥有Havok FX的厂商会比较方便，而没有Havok FX的厂商就只有自己设计复杂的转换程序了。<br><b>[Physx全新面世]<br></b>现实之中的PhysX芯片PPU子卡经过去年的跳票之后，终于将要开始面市了。上一次Ageia公司跳票的理由是支持PPU的游戏并不多，应用不够丰富。而现在已经有包括SEGA、Ubisoft和EPIC在内的多价游戏公司表示了对PPU的支持，目前已经有包括国家的崛起之崛起传奇、Ghost Recon 3（幽灵行动 3）、City of Villians、虚幻竞技场2007等多款游戏正式支持PPU加速子卡。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171801_59339.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171801_59339.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171814_50303.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171814_50303.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171821_29593.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171821_29593.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171830_89776.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171830_89776.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>目前被授权生产物理加速卡的只有只有华硕和美国BFG两家，目前影驰已经获得了BFG的正式授权，在包括中国大陆，香港，韩国，日本等亚洲地区开始销售BFG的Ageia PhysX卡。<br><br><b>[影驰代理的BFG 物理加速卡]<br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605171956_23029.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605171956_23029.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172010_38091.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172010_38091.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172020_31499.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172020_31499.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172029_35070.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172029_35070.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172046_41947.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172046_41947.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br></b>影驰作为国内知名显卡厂商，推出的产品经常采用自己的PCB优化设计，并且超频性能极高，成为DIY玩家首选的品牌之一。而此次影驰在国内独家代理BFG的物理加速卡又是为广大玩家提供了最新的物理加速体验。<br><br>BFG物理可以处理游戏中的流体、烟雾、雨滴、碎片等物体，可以呈现出逼真的可互动环境，将原先由CPU、GPU完成的物理引擎处理器工作接管，可以在提供更真实环境的同时加快游戏的运行处理速度。<br><br><b>[影驰代理的BFG物理卡详细参数]<br></b><br><b><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172206_21393.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172206_21393.jpg" onload="if(this.width>'660')this.width='660';" border=0><br></b><br>在散热器下面你可以看到PhysX物理处理器以及容量为128M的板载128-bit GDDR3显存，其中PhysX物理处理器的核心频率为733MHZ（显存为1466 MHz），其总带宽可以达到12 GB/s。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172216_48799.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172216_48799.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>AGEIA表示该芯片的峰值指令位宽为200亿/秒。根据AGEIA公司的白皮书该物理器可以支持每秒5.3亿球体对球体碰撞（sphere-to-sphere）曲面对曲面（Convex-Convex ）碰撞最大为533000/秒。在生产方面，PhysX使用了TSMC公司0.13微米的生产工艺，其内部集成了约1亿2千500万个晶体管。核心大小为182平方毫米。与NVIDIA最近的G71非常相近（G71为196平方毫米）。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172225_75067.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172225_75067.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>AGEIA公司把这个处理器称之为&#8220;highly tuned multi-core processor&#8221;（高和谐多核心处理器）而最后一句话也指出PhysX物理处理器能够支持驱动以及firmware升级，通过升级将可以使得PhysX物理处理器支持新的功能。举个例子，AGEIA在起初为开发者提供的软件中并不支持布料处理，而在最新版本中当前的PPU用户则已经可以免费使用。<br>使用物理加速卡可以降低系统在运行对应游戏时的系统负担，不过同样对于系统有最低配置要求：<br>　　CPU：1.4GHz以上；<br>　　内存：128MB以上；<br>　　操作系统：Windows XP各版本；<br>　　电源：300W；<br>　　显卡：支持微软DirectX SM 2.0或以上；</td>
        </tr>
        </td>
    </tr>
</tbody>
</table>
<br>
<table class=i_table cellSpacing=1 cellPadding=1 width="92%" align=center>
    <tbody>
        <tr>
            <td>
            <table cellSpacing=0 cellPadding=3 width="100%">
                <tbody>
                    <tr class=head>
                        <td><b>macs</b></td>
                        <td class=smalltxt align=right>2006-07-13 16:50</td>
                    </tr>
                    <tr bgColor=#ffffff>
                        <td class=tpc_content colSpan=2><b>[BFG物理卡测试平台及驱动]<br></b><br><b><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605182054_20152.gif');" src="http://hardware1.mydrivers.com/pages/images/20060605182054_20152.gif" onload="if(this.width>'660')this.width='660';" border=0><br></b><br><b><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172412_53067.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172412_53067.jpg" onload="if(this.width>'660')this.width='660';" border=0><br></b><br>这里你可以看到你安装诉PhysX引擎的版本，我们这里安装的版本是2.4.2，不过Cell Factor demo中则是2.4.9。看起来每一个游戏开发商都可以定制自己的PhysX引擎并使用到自己的软件中。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172427_29133.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172427_29133.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>菜单中附带一个DEMO。这个DEMO运行起来比较简单，即发射一枚球然后对积木进行撞击。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172433_41284.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172433_41284.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>在&#8220;settings&#8221;栏目下提供了各种各样的诊断测试项目，你可以通过运行这些测试项目以了解软硬件工作是否正常。 <br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172437_11324.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172437_11324.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><br><b>[AGEIA DEMO测试]<br><br></b><br><br><b><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172610_99727.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172610_99727.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172614_75376.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172614_75376.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172848_41170.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172848_41170.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605172901_89010.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605172901_89010.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br></b><br><br>这个测试非常简单，在没有开启PhysX硬件加速时也可以运行，不过此时所有计算都将由CPU负责。我们看到，PhysX硬件加速至少可以带来10%以上的提升，这是在CPU使用的FX55时的情况。在使用P4 3.2GHz时，我们发现使用硬件加速的优势会更加明显，看来PhysX引擎对双核及协处理方面还是有一定优化，虽然P4 3.2GHz只是开启了HT技术。<br><br><b>[其他支持应用演示]<br><br></b>例如一些科学模拟计算等领域，物理加速的应用仍十分广泛，相信在未来的应用软件中，物理卡的意义也会突现，下面是一些可以支持物理加速软件的演示。<br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192349_60451.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192349_60451.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192358_84959.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192358_84959.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192404_48550.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192404_48550.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192410_99519.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192410_99519.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192414_53824.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192414_53824.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192425_45949.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192425_45949.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192430_34433.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192430_34433.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192438_69581.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192438_69581.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192450_33532.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192450_33532.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192502_45469.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192502_45469.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605192507_65409.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605192507_65409.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br>不过目前我们最关心的仍然是AGEIA PhysX物理加速在游戏中的表现，下面我们就对几款可以支持物理加速的游戏及DEMO进行详细的测试。<br><br><b>[Cell Factor游戏体验]<br><br></b>Cell Factor这款游戏目前仍然研发之中，不过这款游戏只有在安装了PhysX PPU之后才能够正常运行。《细胞因子》(CellFactor)是一款科幻恐怖类型的FPS游戏，描述在未来世界因为半人半机械的&#8220;合成人&#8221;产生错乱，会主动猎杀攻击人类，而玩家扮演的主角Dante Aligheiri，就是专门猎杀狂暴化合成人的特殊作战小队队长，率领四人一组的作战小队，而在充满杀戮危机的科幻世界展开属于人类与机械之间的战斗。 从公开的画面可以看到本作运用了很多真实引擎的电影化效果，例如动态模糊、场景纵深等，而爆炸效果也非常惊人。<br><br>下面选择一个场景，向堆积的物体开枪，我们来看看效果。<br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173845_22426.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173845_22426.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173903_30622.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173903_30622.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173909_19548.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173909_19548.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173915_15268.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173915_15268.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173927_33220.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173927_33220.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173940_18790.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173940_18790.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605173949_50930.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605173949_50930.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br>作为一款肩负着PhysX物理卡崛起这一重任的游戏来说，自从去年年中公布时并不引人注意。而现在，随着PhysX物理卡的推出，其关注度也在日渐提升，以上面出色的物理运算性能可谓令人目瞪口呆。 <br><br><b>[Cell Factor性能测试]<br><br></b>测试中我们选择了三个场景，尽量保持同样的动作，用Fraps纪录帧数。<br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605174308_70751.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605174308_70751.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605174315_95173.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605174315_95173.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br>即使我们使用的是7900GTX，游戏始终只能运行在20FSB左右，当然因为是游戏DEMO，驱动还不购成熟，再者如此&#8220;旋&#8221;的画面对于任何显卡都是一个严峻的考验。<br><br>当然有戏中也可以关闭物理加速及特效，但是显示效果就非常普通了，游戏中所有的物体都变成固定的。而打开物理加速后，画面上每一个物件都在可以在你的攻击下漫天飞舞，这种技术上的炫耀令人体验了游戏从未有过的爽快。<br><br><b>[Ghost Recon游戏画面对比]<br></b>育碧《幽灵行动：尖峰战士》（Ghost Recon Advanced Warfighter）PC版已经是正式压盘的游戏。尽管PC版与其他版本的名称都是《尖峰战士》，但是游戏中的特色还是有很大的不同。首先，PC版由瑞典的GRIN工作室开发的，采用自己的图像引擎。《尖峰战士》也是世界上还为数不多的支持Aegia的PhysX物理处理器的游戏。<br>由于Ghost Recon这款游戏PhysX PPU提供了支持，这也是目前唯一一款能够在安装加速卡和不安装加速卡这两种情况下都能够正常运行的游戏。我们就可以比较直观的对比前后的画面差异。<br>在Ghost Recon这款游戏中，PhysX PPU并不需要用户去完成相关的设置，因为这里并没有提供什么可以关闭或者打开的选项。如果你安装了PhysX PPU，那么相关的物理处理任务就会交由它来完成，如果没有安装PhysX PPU那么则就交由处理器来完成。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175024_93329.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175024_93329.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>关闭PhysX PPU<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175032_79283.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175032_79283.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>开启PhysX PPU<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175039_58360.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175039_58360.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>关闭PhysX PPU<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175046_43259.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175046_43259.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>开启PhysX PPU<br>上面对比的场景是在游戏中使用手雷炸掉一辆汽车，当安装了PhysX 加速卡之后你会发现在爆炸画面中会出现更多的碎片从被摧毁的汽车中飞出。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175053_73290.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175053_73290.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>关闭PhysX PPU<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175100_99313.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175100_99313.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>开启PhysX PPU<br>同样的，在安装了PhysX PPU之后，你可以看到更多的飞溅物，虽然在第一张图中的画面表现已经很不错了，但是当安装PhysX PPU之后，飞溅的粒子体积要更小，数量也更多。<br><br><b>[GHOST Recon 性能测试]<br><br></b>测试中我们采用低、中、高三种测试环境。<br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175455_77181.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175455_77181.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175503_96522.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175503_96522.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175509_35762.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175509_35762.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175700_18476.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175700_18476.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175706_92321.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175706_92321.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175711_19075.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175711_19075.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br>开启PhysX PPU后对画面的影响显而易见，但在整体性能上会对游戏带来什么影响呢，可以肯定当使用PPU之后游戏整体性能会略微下降，这主要是因为在游戏中产生的额外物体需要GPU进行贴图与渲染，这样就增加了GPU的负担。<br><br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605185213_36932.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605185213_36932.jpg" onload="if(this.width>'660')this.width='660';" border=0><br><br>我们也测试了启用物理加速与否在游戏中CPU占用率的影响，如图所示，运用物理加速后，CPU占用率有明显降低，关闭物理加速时基本达到100%占用率。无论如何，我们可以在CPU负荷更低的情况下，提供了更为出色的游戏画面表现，当然其功劳来自PhysX 物理加速卡。<br><br><b>[PPU前景展望]<br></b>虽然PhysX的性能强劲，但是能否得到广大游戏开发商的支持就尤为重要了。 AGEIA在发布PhysX物理处理器的同时也发布了Novodex SDK软件开发包，这款SDK也是全球第一部异步（多线程）软件开发包，可以充分发挥多核心处理器的优势。而著名的EPIC公司甚至表示会把AGEIA的这项技术整合到它们的所开发的次世代Unreal 3.0引擎上，而Unreal 3.0引擎也是Xbox360主机的指定3D引擎工具，可以看出微软对于PhysX的前景是十分看好的。同时在E3大展上，索尼也宣布它的次世代主机PS3也会和Xbox360一样提供对PhysX的支持，看来物理处理器已经成为下一代3D游戏平台的主流配置。<br>《虚幻竞技场2007》PC版游戏内建了对Ageia物理卡的支持，这就意味着游戏效果将更加惊人。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605180621_84145.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605180621_84145.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>而著名的游戏开发商Ubisoft也表现将在下一代的游戏中采用AGEIA的PPU技术，并提供对PhysX物理加速卡的支持，这些游戏包括：Rise of Nations：Rise of Legends（国家的崛起：崛起传奇）、Ghost Recon 3（幽灵行动 3）、City of Villians等等全新游戏。而目前另一款支持物理加速卡的游戏马上就要和广大的游戏玩家见面了，它就是由英国的游戏开发商Digital Jesters发行的Bet on Soldier（赌命战士），这是一款非常独特的第一人射击类游戏，此款游戏提供了对64位技术和物理加速卡的支持，相信游戏发行之时，一定会带给大家一种全新的游戏感受。<br>看来PhysX的表现还是得到了广大厂商的认可，现在唯一需要的就等待更多的支持物理加速的游戏大作了。<br><br><b>[开创新时代]<br></b>相信PhysX物理加速卡已经给大家留下了深刻的印象，通过它我们可以在游戏中感受更多的真实物理效果。其也将给未来游戏带来全新的体验，3D游戏中的运动将不再是按照预定的方式进行，而将是通过遵循多种运动定律的运算得到。而在没有PPU的系统中，哪怕你使用的是最为昂贵的显卡，你所看到的场景将是一成不便的，缺乏变化。<br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605175932_17066.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605175932_17066.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>现在对于PPU的推广来说最大的因素有两个：<br>第一就是其价格。目前其价格在300美元左右，已经和一块高端的显卡相当。但是相信对乐于享受最佳游戏效果的玩家，PhysX仍然会成为首选，因为对于他们顶级的配置，PhysX物理卡的价钱占总体开支还算合理。不过对于大众阶层，目前必然很难接受。<br>再者就是游戏的支持。用户是否需要购买物理卡最终是取决于游戏的，这一情景和十年前显卡的独立非常相似。当时的Quake全新3D画面使用户认识到显卡的重要性，而现在，支持独立物理运算的游戏在画面上也将再一次出现飞跃。如上面测试中画面对比，在拥有PhysX物理卡的模式中，人们将会得到完全真实的世界，这种变革甚至不亚于10年前2D至3D的革命。<br>最后我们引用一段十年前媒体对Voodoo显卡的评价：<br>&#8220;Voodoo 显卡在设计上可以说是独一无二，作为一片3D子卡，本身不包括任何2D输出能力。根据运行程序的支持，自动切换到子卡上运行输出。业界的许多厂商，包括微软都怀疑人们是否真的愿意为改善游戏体验为高达500美元纯3D显卡买单。而1996的春季储存器市场的巨跌无疑是老天对3Dfx公司的眷顾，最终Voodoo子卡以大约300美元的价格开发发售，市场的热销表明该产品真的成功了。&#8221; <br><img onclick="if(this.width>=660) window.open('http://hardware1.mydrivers.com/pages/images/20060605180017_36452.jpg');" src="http://hardware1.mydrivers.com/pages/images/20060605180017_36452.jpg" onload="if(this.width>'660')this.width='660';" border=0><br>AGEIA正在努力去创造出一种全新的游戏环境，而它也将这种改变称为Gaming Power Triangle(游戏性能铁三角)，即CPU+GPU+PPU！</td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
    </tbody>
</table>
<img src ="http://www.cnblogs.com/wangdaniu/aggbug/482983.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42820/" target="_blank">[新闻]AMD拆分方案已确认 获阿联酋84亿美元投资</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>Introduction to Debugging (zz, By Richard "superpig" Fine )</title><link>http://www.cnblogs.com/wangdaniu/archive/2006/08/16/478199.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Wed, 16 Aug 2006 02:40:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2006/08/16/478199.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/478199.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2006/08/16/478199.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/478199.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/478199.html</trackback:ping><description><![CDATA[摘要: As much as we may wish to deny it, human beings are not perfect. We make mistakes. Programmers are not exempt from this and, frequently, the mistakes we make are in the programs we create; such mistak&nbsp;&nbsp;<a href='http://www.cnblogs.com/wangdaniu/archive/2006/08/16/478199.html'>阅读全文</a><img src ="http://www.cnblogs.com/wangdaniu/aggbug/478199.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42817/" target="_blank">[新闻]雅虎新闻首页改版，宽屏、共享、组件</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>DirectX10 Preview Sample New 翻译</title><link>http://www.cnblogs.com/wangdaniu/archive/2006/07/31/464238.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Mon, 31 Jul 2006 09:38:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2006/07/31/464238.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/464238.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2006/07/31/464238.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/464238.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/464238.html</trackback:ping><description><![CDATA[&nbsp;
<h1>DisplacementMapping10 Sample</h1>
<p>This sample implements displacement mapping by ray tracing through geometry extruded from a base mesh. The sample uses Direct3D 10 and the geometry shader to extrude prisms which are then decomposed into three tetrahedra for each triangle in the mesh. The pixel shader ray traces through the tetrahedra to intersect the displacement map. The diffuse color and normal values are then calculated for this point and used to set the final color of the pixel on screen. This sample is an adaptation of a paper from Microsoft Research Asia ( Wang, Xi, Xin Tong, Stephen Lin, Shimin Hu, Baining Guo, and Heung-Yeung Shum. 2004. Generalized Displacement Maps. In Eurographics Symposium on Rendering 2004, pp. 227-234. ) </p>
<p>&nbsp;</p>
<p><span>这个</span><span>Sample<span>通过对一个原始</span>mesh<span>进行几何抽取并进行光线跟踪计算实现了替换贴图（</span>displacement map<span>）。</span>Sample<span>使用</span>D3D10<span>和</span>GS<span>对</span>mesh<span>的每个三角形表面抽出棱柱并把它们分解为三个四面体。</span>PS<span>对这些四面体进行光线跟踪并与</span>Displacement map<span>相交，求得交点后计算该点的漫光和法向并把最终颜色输出到屏幕。这个</span>sample<span>是对微软亚洲研究院的一篇论文修改后的实现（</span>Wang<span>？，</span>Xi<span>？，童欣，郭百宁，</span>Stephen Lin<span>，</span>Shimin Hu<span>，沈向洋等，</span>2004<span>，</span>Generalized Displacement Maps<span>。</span>Enrographics 2004<span>绘制专题会议，</span>227<span>－</span>234<span>页）。</span></span></p>
<p align=center></p>
<p>&nbsp;</p>
<p><span>Displacing mapping<span>： 就是在一张纹理上保存物体表面凹凸不平的信息，在绘制中采样这张纹理得到物体的实际几何信息完成绘制。通常</span>Displacement mapping<span>作为</span>Vertex Shader<span>的纹理使用。</span></span></p>
<h2><a name=Sample_Overview></a>Sample Overview</h2>
<p>There have been many approaches to displacement mapping in recent history. Many rely on tessellating the geometry to a high level of detail and then displacing this geometry based upon a height value stored in a height map. DisplacementMapping10 uses a different approach. Instead of producing detail by displacing highly tessellated geometry, the sample creates three tetrahedra for every input triangle and uses a per-pixel ray tracing approach to evaluate the geometry. </p>
<p><span>在历史上有许多种方法实现</span>displacement mapping<span>。大部分方法依赖于将物体几何细化到高层次细节，然后使用存在一张高度图中的高度值来改变表面细节的几何信息。</span>DisplacementMapping10<span>使用不同的方法。</span>Sample<span>通过对每个输入的三角形创建</span>3<span>个四面体并用逐像素光线跟踪来计算几何来替代传统的高度细化几何创建层次细节的方法。</span></p>
<h2><a name=Extruding_Geometry></a>Extruding Geometry</h2>
<p>For every triangle on the mesh, a triangular prism is extruded. The prism is constructed by extruding the vertices of the triangle along the directions of their normals by an amount specified to be the maximum displacement. The XY texture coordinates at the top of the prism remain the same as the bottom; however, the Z coordinate becomes 1 to represent the maximum displacement. A naive approach would be to ray trace through this extruded prism by finding the texture coordinates where the eye ray enters and exits the prism. By taking an evenly spaced sampling of a height map texture between the entry and exit points, one could easily determine where the ray intersects the height map. </p>
<p>Sample<span>对</span>mesh<span>上的每个三角形抽取一个三棱柱。棱柱通过把三角形三个顶点沿着法向方向平移一定距离建立，偏移距离能使棱柱达到最大的</span>displacement<span>距离。棱柱顶部的</span>XY<span>纹理坐标和底部一样，</span>Z<span>坐标变为</span>1<span>代表最大的</span>displacement<span>距离。要找到视线射入和射出三棱柱处的纹理坐标，最简单的方法是使用光线跟踪对视线和三棱柱求交。通过对高度图纹理在入射点和出射点附近均匀空间采样，我们可以简单确定光线在何处和高度图相交。</span></p>
<p align=center></p>
<p>Unfortunately, there are two problems with this approach. </p>
<p>Problem 1: Because of varying curvature in the mesh, the four points that make up each side of the prism are not guaranteed to be coplanar. When extruding the prism, each side will be split into two triangles. Any neighboring face will also share this edge as an edge of its extruded prism. If the neighboring triangle does not create the sides of its prism in a way that correlates to how the current triangle creates the same edge, cracks may appear in the final rendering. </p>
<p><span>不幸的是，这种方法有两个问题。</span></p>
<p>&nbsp;</p>
<p><span>问题</span><span>1<span>：因为</span>mesh<span>表面曲率变化非常大，构建三棱柱各个面的四个顶点不一定是共面的。当抽取三棱柱时，每个面会被分为两个三角形。任何两个相邻表面会把中间这条边作为抽取三棱柱的边来共享。如果邻接三角形没有通过和当前三角形创建这条边相对应的方式来生成三棱柱的表面，在最终绘制就就会出现裂痕。</span></span></p>
<p>Problem 2: It's very hard to calculating the exit texture coordinate for an eye ray traveling through a triangular prism. The entry point, on the other hand is easy. Because of depth-buffering, the nearest triangle to the eye will always be drawn. The graphics hardware will automatically interpolate the entry texture coordinate across the draw faces. The rear exit point is a different story. One could do ray-plane intersections to get the distance to the rear of the prism. This is a good start, but still doesn't give us the texture coordinates. Calculating barycentrics for a triangle are costly in the shader. One could pass down an un-normalized tangent basis frame (TBN matrix) and transform the view vector into this frame, add it to the input texture coordinate, and achieve the exit texture coordinate. Unfortunately, this breaks down when the mesh deforms since under high deformation, the un-normalized tangent frame is non-constant across the prism. </p>
<p><span>问题</span><span>2<span>：计算每条视线穿过三棱柱后出射点的纹理坐标是非常困难的。但是计算入射点却很简单。因为有深度缓存，离视点最近的三角形都会被画出来。图形硬件会自动对入射点纹理坐标在绘制表面上进行线性插值。出射点的算法则完全不一样。可以通过线－面相交计算来得到视点到三棱柱背面的距离。这样做有一定道理，但是得不到纹理坐标。在</span>Shader<span>里对三角形计算中心也是非常耗时的。也可以通过传入一个非归一化的基于切向的结构（使用</span>TBN<span>矩阵）并把视点向量转换到这个结构上，把它加到输入纹理坐标上获得输出的纹理坐标。不幸的是，当</span>mesh<span>在高度变形的情况下它就会失效，因为在非归一化的切向结构在变形中并不是保持常数。</span></span></p>
<h2><a name=Using_Tetrahedra></a>Using Tetrahedra</h2>
<p>The two problems above can be solve by decomposing the the prism into three tetrahedra and by using the VertexID generated by the input assembler to order the vertices when creating the tetrahedra. </p>
<p><span>上述两个问题可以通过把三棱柱分为三个四面体来解决。使用</span><span>IA<span>阶段生成的</span></span><span>VertexID<span>值对顶点排序可以创建这些四面体。</span></span></p>
<p align=center></p>
<p>The distance to the rear of a tetrahedron is computed by intersecting the eye ray with the planes of the tetrahedron facing away from the eye and choosing the smallest distance. Now, the only problem left is to determine the texture coordinates at the exit point. </p>
<p><span>到四面体背面的的距离可以通过把视线和背离视点的四面体表面相交并从中选择一个最小距离来得到。现在问题只剩下怎么确定射出点的纹理坐标。</span></p>
<p>A nice property of a tetrahedron is that by using the texture coordinates of the 4 points, a constant texture gradient can be found across the tetrahedron. By using this gradient, the entry texture coordinate (computed easily during rasterization), and the distance to the rear of the tetrahedron, the shader can compute the exit texture coordinates. </p>
<p><span>四面体的一个很好的属性就是使用它四个顶点的纹理坐标可以计算出一个穿过四面体的常数纹理梯度。使用梯度值，输入点纹理坐标（在光栅化过程中可以轻松得到）和到四面体背面的距离，</span><span>shader<span>就能算出射出点的纹理坐标。</span></span></p>
<p align=center></p>
<h2><a name=Intersecting_The_Displacement_Map></a>Intersecting the Displacement Map</h2>
<p>Once the entry and exit texture coordinates are known, it's only a matter of stepping from one to the other. While stepping along the ray from the entry to the exit coordinates, the XY components are used to lookup into the displacement map. The Z component represents the height from the base triangle. This is compared against the height value returned by the lookup into the displacement map. If the Z component of the ray is less than the height returned by the displacement map, the sample assumes that an intersection has taken place and stop searching. If no intersection is found before reaching the exit texture coordinate, the pixel is discarded. </p>
<p><span>一旦射入点和射出点的纹理坐标都知道了，只需要一步步从射入点采样到射出点。多步采样时，</span><span>XY<span>通道作用采样</span>displacement<span>纹理，</span>Z<span>通道代表到基三角形的距离并和从</span>displacement<span>纹理中得到高度值做比较。如果</span>Z<span>通道小于采样值，就认为视线和四面体相交，停止搜索返回。如果在到达射出点之前没有找到交点，就剔除这个像素。</span></span></p>
<p align=center></p>
<p>Once the intersection point is found, all that is left is to determine the color and normal at the point of intersection. Again, if no intersection point is found, the pixel is simply discarded. The diffuse color at the intersection point can be found by sampling the diffuse texture at the XY coordinates of the ray where the ray intersected the displacement map. While the displacement map provides enough information to determine the normal at the point of intersection (using finite differencing), this sample encodes a normal map as the rgb components of the displacement texture (displacement is stored in alpha). Thus, the last sample along the entry/exit ray contains the normal for the point of intersection.<a name=Problems></a></p>
<p><span>一旦找到了交点，接下来就需要确定交点的法向和颜色。如果没有找到这个交点，就剔除这个像素。交点的漫反射颜色可以使用交点的</span>XY<span>通道来采样漫反射纹理得到。因为</span>Displacement<span>纹理提供了足够的信息来得到交点的法向（使用差分），它的</span>rgb<span>通道可以用来保存一张法向图（</span>alpha<span>通道用来保存高度）。因为最后沿着入射</span>/<span>出射点的采样结果包含了交点的法向信息。</span></p>
<h2>Problems</h2>
<p>One problem with this technique is also a problem with most displacement mapping techniques. In areas of high concave curvature, the extruded prism can actually fold in on itself and flip. This causes the tetrahedra and resulting ray trace to be incorrect. The solution that the sample employs is to detect these cases and reduce the amount of displacement for the offending triangle. </p>
<p><span>这种技术存在的一个问题也是所有</span>displacement mapping<span>技术的问题。如果某个区域曲面曲率很高，抽取的三棱柱会折叠入曲面内部并产生翻转。这会导致四面体和光线跟踪的结果不正确。解决的方法的是在采样时检测这种情况并减少这类三角形变形的数值。</span></p>
<p>Another problem with this technique is sampling artifacts. If the number of steps per ray is too small, some high-frequency details can be missed. For very low sampling rates, this can cause details to pop in and out as the camera or object moves. Although geometry based displacement mapping also has frequency issues, the connectivity between the triangles ensure that there is always a smooth transition between different height values. Furthemore, geometry based methods are not dependent on the orientation of the view ray, so no popping of detail occurs when the object or camera moves. </p>
<p><span>这个技术的另一问题时采样走样。如果每条光线采样的步数太少，一些高频的细节会被忽略。很低的采样率会导致在视点或者屏幕移动时，物体表面细节出现凹凸起伏的现象。虽然基于几何</span>displacement<span>变形算法的也有采样频率的问题，但是三角形之间的连接保证物体表面不同高度值之间仍然能够平滑变换。进一步说，基于几何的算法不依赖视线，所有在物体或视点移动时不会出现凹凸起伏的问题。</span></p>
<h2><a name=Comparison_To_Other_Techniques></a>Comparison with Other Techniques</h2>
<p>In this section, we compare traditional methods of achieving higher detail with the method this sample uses. The base mesh is 1480 polygons. For normal-mapping, the polygon count stays at 1480. For traditional displacement mapping, the mesh is uniformly tessellated to a high number of polygons and then the vertices are displaced according to the height of the displacement map. For ray-traced displacement (this sample), the mesh is converted into 3 tetrahedra (4 triangles each) in the geometry shader, such that 17760 triangles are actually passed to the pixel shader. </p>
<p><span>在这节中，我们把</span>sample<span>中的算法和传统算法在获得高层次细节上做比较。原始纹理是</span>1480<span>个多边形。对于法向贴图，多边形数目保持在</span>1480<span>。对于传统的</span>displacemnt <span>贴图，</span>mesh<span>被不一致细化产生大量多边形并把顶点按照</span>displacement<span>纹理做移动。对于光线跟踪</span>displacement mapping<span>（这个</span>sample<span>中的算法），</span>mesh<span>在</span>GS<span>中被转换为</span>3<span>个四面体（每个</span>4<span>个顶点），所以传送到</span>PS<span>中的三角形数目为</span>17760<span>个。</span></p>
<p align=center></p>
<p>Notice the lack of self occlusion or definition on the silhouette of the object.</p>
<p><span>注意物体表面没有自遮挡或者本影区域。</span></p>
<p align=center></p>
<p>At 23680 triangles, the mesh still lacks some details. Notice the precision issues around the eyes.</p>
<p><span>在</span>23680<span>个三角形的情况下，</span>mesh<span>依然损失了一些细节。注意眼部周围的精度问题</span></p>
<p align=center></p>
<p>This is a screenshot from the DisplacementMapping10 sample. It uses the ray traced displacement method described above. The eye ray is traced through the geometry shader created tetrahedra and intersected with the displacement map. This is from the base mesh of 1480 triangles that is expanded to 17760 triangles in the GS. Notice the level of detail compared to the traditional method using 23680 triangles.</p>
<p><span>这是一个</span>sample<span>的截图。它采用了上述的光线跟踪</span>displacement<span>算法。视线穿过了</span>GS<span>创建的四面体并和</span>displacement map<span>相交。原始</span>mesh<span>有</span>1480<span>个三角形，在</span>GS<span>中被扩展到</span>17760<span>个三角形。注意和使用</span>23680<span>个三角形</span>mesh<span>计算的传统</span>displacement map<span>算法比较层次细节。</span></p>
<p align=center></p>
<p>This mesh was rendered using the traditional method of displacement by tessellating the mesh to 378880 triangles. Compare this to the image above rendered with 1480 (17760 triangles after the GS).</p>
<p><span>这是使用传统算法绘制的图像，</span>mesh<span>被细化为</span>378880<span>个三角形。可以和上面使用</span>1480<span>个三角形（</span>GS<span>中</span>17760<span>个三角形）做比较。</span></p>
<h1>MotionBlur10 Sample</h1>
<p>This sample implements motion blur using the geometry shader to extrude fins from the original mesh.</p>
<p align=center></p>
<p><span>这个</span>sample<span>使用</span>GS<span>从原始</span>mesh<span>上抽取边缘面片来实现运动模糊。</span></p>
<h2>Sample_Overview</h2>
<p>The MotionBlur10 sample implements motion blur using a geometric approach combined with order independent transparency through the use of AlphaToCoverage and with anisotropic texture filtering. </p>
<p>MotionBlur10 sample<span>使用几何方法并结合顺序独立透明计算（通过使用</span>AlphaToCoverage<span>和各异向行纹理采样）实现运动模糊。</span></p>
<h2>Extruding Geometry</h2>
<p>Geometry is extruded along the path of motion. A triangle strip is extruded backwards and forwards in time such that the middle triangle is always at the current time. This is done by passing in an array of matrices each containing the transformation information for specific points in time. Namely, N equally spaced points of time ahead and N equally spaced points of time behind. The sample handles this in the application code by calculating the current time and then determining how far to go backwards in time based upon the length of time that the fictional "shutter" will stay open. The middle time in this array of matrices is where the object will look most "solid". This method allows the motion blur effect to be independent of frame rate. The only dependency is that the application must track or guess the locations of the objects at times in the past. Normally this is just a few fractions of a second into the past, but for dramatic effect, applications could blur over several seconds. </p>
<p><span>几何沿着运动的路径抽取。沿着运动时间抽取一条三角条带，中间三角形代表当前时间三角形的位置而前后的三角形分别代表过去和未来的三角形位置。这些通过传入一组代表一些特定时间点变换信息的矩阵得到，包括</span>N<span>个过去的等距时间点和</span>N<span>个未来的等距时间点。</span>sample<span>通过在程序中计算当前时间然后根据划定的时间长度确定往回计算多少步得到对应的三角形。这个矩阵数组中最中间的时刻也是这个物体看起来最实在的时刻。这种方法允许运动模糊独立于帧率。</span>Sample<span>对时间的唯一的依赖之处在于程序需要跟踪或者猜测物体在过去某个时间的位置。通常这只是过去一秒中很小的一部分时间，但是对于动态效果，程序能够模糊好几秒。</span></p>
<p>&#160;</p>
<h2><a name=Alpha_Blending></a>Alpha Blending</h2>
<p>As each section of the triangle strip is extruded, it is given an alpha value based upon how much time has elapsed between the time represented by this section of the strip and the current time (the triangle in the middle of the forwards and backwards strip). Because this information is not transmitted back to the CPU, we do not have the option of using the CPU to sort the triangles for accurate alpha blending. Therefore, the sample uses AlphaToCoverage to fake order independent transparency. Please see the Instancing10 sample for a more detailed description of transparency using AlphaToCoverage. </p>
<p><span>在三角条带的每一段都被抽取出来后，它被赋予一个</span>Alpha<span>值，该值由这个条带代表的时间和当前时间的时间（处于过去条带和将来条带之间的三角形代表的时间）差来决定。因为这些信息没有被送回</span>CPU<span>，所以我们不能使用</span>CPU<span>对三角形排序计算精确的</span>alpha<span>混合。因此，这里使用</span>AlphaToCoverage<span>来实现顺序独立半透明效果。请参见</span>Instancing10 sample<span>了解</span>AlphaToCoverage<span>更多的细节描述。</span></p>
<p>&#160;</p>
<h2><a name=Texture_Space_Motion_Blur></a>Texture Space Motion Blur</h2>
<p>The final trick to achieving the motion blur illusion is to blur the texture in the direction of motion when sampling. This is achieved by enabling anisotropic filtering and carefully controlling the ddx and ddy parameters to SampleGrad. These can be found by transforming the vector indicating the direction of motion into the texture space for that particular triangle. </p>
<p><span>获得运动模糊效果的最后一个</span>trick<span>是在采样纹理时沿着运动方向模糊纹理。这通过打开各异向性采样并仔细控制</span>SampleGrad<span>函数的</span>ddx<span>，</span>ddy<span>参数来实现。这些参数能够通过把表示运动方向的顶点对于某个特定的三角形转换到它纹理空间上得到。</span></p>
<p>&#160;</p>
<pre>// Find the projection of our motion into our tangent/texture space</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>Output.Aniso.y = max( 0.0001, abs( g_fTextureSmear*dot( clipTangent, clipMotionDir ) ) );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>Output.Aniso.x = max( 0.0001, abs( g_fTextureSmear*dot( clipBiTangent, clipMotionDir ) ) );</pre>
<p>Note that the g_fTextureSmear variable can be used to control how much the texture will stretch along the direction of motion. Setting this value too high can result in the anisotropic filter accessing part of the texture completely unrelated to the current texture coordinate. </p>
<p><span>注意到</span>g_fTextureSmear<span>变量能够用作控制纹理能够在运动方向上拉伸多少距离。如果这个值设的过高会导致各异向性采样完全和当前的纹理坐标无关。</span></p>
<p>&nbsp;</p>
<h1>MultiStreamRendering Sample</h1>
<h2>Sample Overview</h2>
<p>This sample explains how to perform multi-stream rendering on Direct3D 9 and Direct3D 10 platforms. Multi-stream rendering allows vertex attributes to be split between different vertex streams. Multiple streams are referenced using a single index buffer. In addition, Direct3D 10 allows multi-stream and multi-index rendering, where multiple indices are used to access vertex data that is stored at frequencies. In this sample, the Direct3D 10 codepath references positions that are stored once per vertex and, in the same shader, references normals that are only stored once per triangle. </p>
<p><span>这个</span>sample<span>解释了如在在</span>D3D9<span>和</span>D3D10<span>中使用多数据流绘制。多数据流绘制允许顶点属性放置到不同的顶点数据流中，这些数据流使用同一个索引缓存。同时</span>D3D10<span>允许顶点数据多数据流和多索引流绘制，多个索引能够访问统一顶点数据多次。在这个</span>sample<span>中，</span>D3D10<span>编码路径索引位置保存在一个顶点中；但在相同的</span>shader<span>中，索引法向只保存在每个三角形中。</span></p>
<h2><a name=Multi-Stream_Single-Index_Rendering_Dire></a>Multi-Stream Single-Index Rendering in Direct3D 9</h2>
<p>Multi-Stream Single-Index rendering renders geometry using multiple vertex streams that are indexed by the same index buffer. This means that all data must be stored at the same frequency (namely, data is stored per-vertex). For mult-stream single-index rendering, 4 input vertex buffers are created. They store position, normal, textures coordinates, and alternative texture coordinates respectively. </p>
<p><span>单索引多数据流绘制使用单个索引缓存来组织多个顶点数据。这意味着所有数据必须以相同的频率存放（就是说数据必须是逐顶点的）。多数据流单索引绘制需要创建</span>4<span>个输入顶点缓存分别保存位置，法向，纹理坐标和可替换的纹理坐标。</span></p>
<p>The first step is to create a vertex declaration that incorporates all of these individual vertex streams. The goal of this vertex declaration is to make the multiple individual streams look like one unified stream to the vertex shader. </p>
<p><span>第一步是创建顶点申明，把所有独立的顶点缓存连接起来。顶点申明的目的是让多个独立的数据流从</span>vertex shader<span>角度看像是一个数据流。</span></p>
<pre>// Create a Vertex Decl for the MultiStream data.</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// Notice that the first parameter is the stream index.&nbsp;This indicates the</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// VB that the particular data comes from.&nbsp;In this case, position data</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// comes from stream 0.&nbsp;Normal data comes from stream 1.&nbsp;Texture coordinate</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// data comes from stream 2.</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>D3DVERTEXELEMENT9 declDesc[] = </pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>{</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{1, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT,&nbsp;D3DDECLUSAGE_NORMAL, 0},</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{2, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT,&nbsp;D3DDECLUSAGE_TEXCOORD, 0},</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{0xFF,0,D3DDECLTYPE_UNUSED, 0,0,0}// D3DDECL_END </pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>};</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;CreateVertexDeclaration( declDesc, &amp;g_pDecl );</pre>
<p>Before rendering the sample must make sure that all streams are bound, that the index buffer is bound, and that the correct vertex declaration is set. Notice that the third vertex stream ( stream number 2 ) can be switched between the original set of texture coordinates and the alternate set of texture coordinates without affecting the other streams. </p>
<p><span>在绘制之前，</span>sample<span>必须保证所有的数据流都被绑定，索引缓存也被绑定，正确的顶点申明被设置。注意第三个顶点数据流（流编号</span>2<span>）能够从原始纹理坐标和替换纹理坐标之间相互切换而不需要影响到其他数据流。</span></p>
<pre>// Setup our multiple streams</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;SetStreamSource( 0, g_pVBs[ST_VERTEX_POSITION], 0, sizeof(D3DXVECTOR3) );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;SetStreamSource( 1, g_pVBs[ST_VERTEX_NORMAL], 0, sizeof(D3DXVECTOR3) );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>if(g_bUseAltUV)</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;SetStreamSource( 2, g_pVBs[ST_VERTEX_TEXTUREUV2], 0, sizeof(D3DXVECTOR2) );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>else</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;SetStreamSource( 2, g_pVBs[ST_VERTEX_TEXTUREUV], 0, sizeof(D3DXVECTOR2) );</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// Set our index buffer as well</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;SetIndices( g_pIB );</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// Set A Multistream Vertex Decl insted of FVF</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;SetVertexDeclaration( g_pDecl );</pre>
<p>This is all of the work necessary to facilitate multi-stream single-index rendering on Direct3D 9. The vertex shader is written as if all of the input came in from a single stream. </p>
<p><span>这是</span>D3D9<span>中进行多数据流单坐隐绘制的所有工作。</span>Vertex shader<span>可以写成把它们当作来自同一个数据流。</span></p>
<h2>Multi-Stream Single-Index Rendering in Direct3D 10</h2>
<p>The setup is similar for performing multi-stream single-index rendering in Direct3D 10. The same vertex buffers are created (position, normal, texture coordinates, alternate texture coordinates). The sample then creates and input layout incorporating the separate vertex streams. Again, the purpose is to make the multiple vertex streams look like one stream to the vertex shader. </p>
<p><span>在</span>D3D10<span>中初始化多数据流单索引绘制和</span>D3D9<span>类似。创建相同的顶点缓存（位置，法向，纹理坐标，替换纹理坐标）。然后创建输入层，使</span>VS<span>认为它们是从一个流中输入的。</span></p>
<pre>// Create a Input Layout for the MultiStream data.</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// Notice that the 4th parameter is the stream index.&nbsp;This indicates the</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// VB that the particular data comes from.&nbsp;In this case, position data</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// comes from stream 0.&nbsp;Normal data comes from stream 1.&nbsp;Texture coordinate</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// data comes from stream 2.</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>const D3D10_INPUT_ELEMENT_DESC vertlayout_singleindex[] =</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>{</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{ "SV_POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{ "<st1:city w:st="on"><st1:place w:st="on">NORMAL</st1:place></st1:city>",<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0, DXGI_FORMAT_R32G32B32_FLOAT, 1, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{ "TEXCOORD0",<span>&nbsp;&nbsp; </span>0, DXGI_FORMAT_R32G32_FLOAT,<span>&nbsp;&nbsp;&nbsp; </span>2, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>};</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>UINT iNumElements = sizeof(vertlayout_singleindex)/sizeof(D3D10_INPUT_ELEMENT_DESC);</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>D3D10_PASS_DESC PassDesc;</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>g_pRenderScene_SI-&gt;GetPassByIndex( 0 )-&gt;GetDesc( &amp;PassDesc );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>V_RETURN( pd3dDevice-&gt;CreateInputLayout( vertlayout_singleindex, iNumElements, PassDesc.pIAInputSignature, &amp;g_pVertexLayout_SI ) );</pre>
<p>Before rendering the sample must make sure that all streams are bound, that the index buffer is bound, and that the correct input layout is set. Notice that the third vertex stream ( stream number 2 ) can be switched between the original set of texture coordinates and the alternate set of texture coordinates without affecting the other streams. </p>
<p><span>在绘制前程序必须保证所有缓存都被保证&#8230;&#8230;靠，又来了，烦不烦！！</span></p>
<pre>UINT strides[3];</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>UINT offsets[3] = {0, 0, 0};</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// Set the parameters for MultiIndex or SingleIndex</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>ID3D10Buffer* pBuffers[3];</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>...</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;IASetInputLayout( g_pVertexLayout_SI );</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[0] = g_pVBs[ST_VERTEX_POSITION];</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[1] = g_pVBs[ST_VERTEX_NORMAL];</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>if( g_bUseAltUV )</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[2] = g_pVBs[ST_VERTEX_TEXTUREUV2];</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>else</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[2] = g_pVBs[ST_VERTEX_TEXTUREUV];</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>strides[0] = sizeof(D3DXVECTOR3);</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>strides[1] = sizeof(D3DXVECTOR3);</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>strides[2] = sizeof(D3DXVECTOR2);</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>numVBsSet = 3;</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span></pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>...</pre>
<pre><span>&nbsp;&nbsp; </span></pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>pd3dDevice-&gt;IASetVertexBuffers( 0, numVBsSet, pBuffers, strides, offsets );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;IASetIndexBuffer( g_pIB, DXGI_FORMAT_R32_UINT, 0 );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;IASetPrimitiveTopology( D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST );</pre>
<h2><a name=Multi-Stream_Multi-Index_Rendering></a>Multi-Stream Multi-Index Rendering</h2>
<p>The Direct3D 10 codepath also allows the use of vertex streams that are stored at different frequencies. In order to access this vertex data stored at different frequencies, multiple index buffers are needed. Note that there is no API to allow users of Direct3D 10 to set more than one index buffer at a time. To perform this multi-stream multi-index rendering, some fancy shader work must be done. </p>
<p>D3D10<span>允许使用不同顶点个数的顶点缓存。为了获得不同缓存顶点数据，我们需要使用多个索引缓存。注意在</span>D3D10<span>中没有</span>API<span>允许用户同时设置多个索引缓存，为了做到多数据流单索引，必须在</span>shader<span>里面做一些工作。</span></p>
<p>First the buffers are created. In this scenario, 4 streams are created. They are described as follows: </p>
<ul type=disc>
    <li>FewVertexPositiosn: Stores NumVertices unique positions. </li>
    <li>PositionIndices: Stores NumFaces*3 indices into the position buffer. </li>
    <li>VertexTextureUV: Stores NumFaces*3 texture coordinates. </li>
    <li>VertexTextureUV2: Stores NumFaces*3 texture coordinates. </li>
    <li>FaceNormals: Stores NumFaces vertex normals.</li>
</ul>
<p><span>首先创建各个缓存。在这个场景里创建了</span>4<span>个流。它们描述如下：</span></p>
<p>FewVertexPosition<span>：保存</span>NumVertices<span>个单独的位置</span></p>
<p>PositionIndices<span>：在位置缓存里保存</span>NumFaces<span>&#215;</span>3<span>个索引</span></p>
<p>VertexTextureUV<span>：保存</span>NumFaces<span>&#215;</span>3<span>个纹理坐标</span></p>
<p>VertexTextureUV2<span>：保存</span>NumFaces<span>&#215;</span>3<span>个纹理坐标</span></p>
<p>FaceNomral<span>：保存</span>NumFaces<span>个顶点法向</span></p>
<p>Note that FewVertexPosition holds NumVertices positions, while PositionIndices, VertexTextureUV, and VertexTextureUV2 hold NumFaces*3 values. In addition, FaceNormals only contains NumFaces values. This shows a large difference in data frequencies since NumVertices != NumFaces*3 in this scenario. </p>
<p><span>注意</span>FewVertexPosition<span>保存</span>NumVertices<span>个位置，同时</span>PositionIndeics<span>，</span>VertexTextureUV<span>和</span>VertexTextureUV2<span>保存</span>NumFaces<span>&#215;</span>3<span>个数值。</span>FaceNormals<span>只保存</span>NumFaces<span>个法向。在这个场景里，数据个数有巨大的区别，因为</span>NumVertices<span>不等于</span>NumFaces*3<span>。</span></p>
<p>Since the position indices and texture coordinates share the same frequency, they can be added to the input layout. </p>
<p><span>因为位置索引和纹理坐标使用相同的顶点个数，它们能够被添加到输入层次中。</span></p>
<pre>// Create a Input Layout for the MultiStream MultiIndex data.</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>// </pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>const D3D10_INPUT_ELEMENT_DESC vertlayout_multiindex[] =</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>{</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{ "POSINDEX",<span>&nbsp;&nbsp;&nbsp; </span>0, DXGI_FORMAT_R32_UINT,<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span> 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{ "TEXCOORD0",<span>&nbsp;&nbsp; </span>0, DXGI_FORMAT_R32G32_FLOAT,<span>&nbsp;&nbsp;&nbsp; </span>1, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>};</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>iNumElements = sizeof(vertlayout_multiindex)/sizeof(D3D10_INPUT_ELEMENT_DESC);</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>g_pRenderScene_MI-&gt;GetPassByIndex( 0 )-&gt;GetDesc( &amp;PassDesc );</pre>
<pre><span>&nbsp;&nbsp;&nbsp; </span>V_RETURN( pd3dDevice-&gt;CreateInputLayout( vertlayout_multiindex, iNumElements, PassDesc.pIAInputSignature, &amp;g_pVertexLayout_MI ) );</pre>
<p>They are also bound as vertex buffers similarly to the way it is handled for multi-stream single-index rendering.</p>
<p><span>同时和多数据流单索引类似绑定顶点缓存。</span></p>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pd3dDevice-&gt;IASetInputLayout( g_pVertexLayout_MI );</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[0] = g_pVBs[ST_POSITION_INDEX];</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>if( g_bUseAltUV )</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[1] = g_pVBs[ST_VERTEX_TEXTUREUV2];</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>else</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pBuffers[1] = g_pVBs[ST_VERTEX_TEXTUREUV];</pre>
<pre>&nbsp;</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>strides[0] = sizeof(UINT);</pre>
<pre><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>strides[1] = sizeof(D3DXVECTOR2);</pre>
<p>However, the data stored at different frequencies must be passed in as buffers. </p>
<p><span>当然，保存不同数目顶点的数据必须作为缓存传入：</span></p>
<pre>g_pPosBuffer-&gt;SetResource( g_pFewVertexPosRV );</pre>
<pre>g_pNormBuffer-&gt;SetResource( g_pFaceNormalRV );</pre>
<p>The rest of the magic happens in the vertex shader. The vertex position is loaded from the position buffer based upon the input position index. The face normal is loaded from the normal buffer using the vertexID/3. SV_VertexID is automatically generated by the input assembler. The sample could also use SV_PrimitiveID (not divided by 3) to accomplish the same task. </p>
<p><span>魔术的剩下部分就在</span>VS<span>里完成。基于输入位置索引的顶点位置从位置缓存里载入，表面法向从法向缓存里载入使用</span>vertexID/3<span>。</span>SV_VertexID<span>在</span>IA<span>中自动生成。</span>Sample<span>也可以是用</span>SV_PrimitiveID(<span>并不是除以</span>3)<span>来完成相同的任务。</span></p>
<pre>float4 Pos = g_posBuffer.Load( input.PositionIndex );</pre>
<pre>float4 Norm = g_normBuffer.Load( input.vertID/3 );</pre>
<pre>&nbsp;</pre>
<h1>SoftParticles Sample</h1>
<pre>
</pre>
<h2>Sample Overview</h2>
<p>Particle systems are a common method for creating volumetric effects in games. They can be used to simulate various effects such as fire, cloudes, smoke, dust, glowing projectiles, magic spells, etc. A common technique is to use 2D camera-aligned quads centered at each particle to represent the volume that the particle represents. Because the quads follow the camera, they give the illusion of a substance filling a 3D volume. However, this illusion often breaks down when the 2D sprites used to visualize the particles intersect with the world geometry. The intersection of the 2D quad with the 3D world geometry creates a hard, straight line. On one side of the line is particle. On the other side is world geometry. </p>
<p><span>粒子系统是在游戏中创建体绘制效果的一种普遍采用的算法。它们能被用作模拟大量的效果，比如火、云、烟尘、光晕物体，魔法等等。一种普通的方法是在粒子中心使用和屏幕平行的</span>2D<span>方块代表粒子。因为方块和屏幕平行，所以它们看起来就像许多很小的</span>3D<span>物体。当然，这种方法在要表现</span>2D<span>方块（精灵）和世界上其他物体相交时会出现问题。</span>2D<span>方块和</span>3D<span>现实世界几何相交会出现一条直线，一半在粒子上，另一半在现实世界几何上。</span></p>
<p>Hard Flat Particles Example:</p>
<p>&#160;</p>
<h2><a name=2D_Particles_With_Depth></a>2D Particles with Depth</h2>
<p>The first approach to dealing with this is to perturb the depth being output from the pixel shader by a depth being stored in the particle texture. This makes the intersections with the world geometry follow the contour of the particle. </p>
<p>Depth Particles Example:</p>
<p><span>对应这种现象的第一个方法是使用保存在粒子纹理里的深度值来扰动</span>PS<span>输出的深度。这使得只有粒子的外形和现实世界几何相交。</span></p>
<p><span>深度粒子系统的例子：</span></p>
<p>&#160;</p>
<h2><a name=2D_Soft_Particles></a>2D Soft Particles</h2>
<p>In the basic flat particle system, the line where the particle quad intersects the geometry is a giveaway that the particles are not actually 3D. To avoid this, the sample can read back the depth buffer as a texture. In the shader, this depth value is sampled and tested against the depth value being rendered for the current pixel in the particle. The alpha value increases as the difference between the depth value in the buffer and then depth being written out from the pixel shader decreases. Therefore, the particle becomes more transparent as it approaches intersection with the scene geometry. </p>
<p>Soft 2D Particles Example:</p>
<p><span>在基本的平面粒子系统中，粒子方块和几何相交产生的直线是由于粒子本身不是</span>3D<span>的。为了避免这种现象，</span>sample<span>能够把深度缓存作为纹理读回。在</span>Shader<span>中，这个深度值被采样并且和</span>PS<span>中正在处理的粒子的像素深度做比较。</span>Alpha<span>值会在采样深度值和像素深度值之差减小时增加。因此，粒子当它和几何相交时变得更加透明。</span></p>
<p><span>软</span>2D<span>粒子的例子：</span></p>
<p>&#160;</p>
<h2><a name=Depth_Soft_Particles></a>Depth Soft Particles</h2>
<p>The same approach can be used with particles that output depth. The only difference is that the depth compared with the depth buffer is not the depth from the quad, but the depth from the quad augemented by the depth stored in the particle texture. </p>
<p>Soft 2D Particles Example:</p>
<p><span>相同的方法也可以对输入深度的粒子使用。它们之间的唯一区别在于和深度缓存采样深度做比较的不是像素深度而是粒子纹理中作为参数保存的深度。</span></p>
<p><span>软</span>2D<span>粒子系统的例子：</span></p>
<p>&#160;</p>
<p>&#160;</p>
<h2><a name=Animating_the_2D_Particles></a>Animating the 2D Particles</h2>
<p>To animate the 2D particles, the sample uses a series of animated particle texture "frames" stored in a volume texture. The first slice of the volume texture stores the first frame of the animation. The last slice stores the last. As the particle ages, the shader looks up </p>
<p><span>为了表现</span>2D<span>粒子动画，</span>sample<span>使用一系列的运动粒子纹理&#8220;帧&#8221;保存在体纹理中。体纹理的第一页保存动画的第一帧，最后一页保存最后一帧。当粒子周期改变时，</span>shader<span>查找不同的纹理帧。</span></p>
<h2><a name=Volumetric_Particles></a>Volumetric Particles</h2>
<p>The volumetric techniques in the sample give the particles the appearance of true 3D volume instead of the flat look of 2D particles. In order to achieve this, the sample traces rays through an imaginary 3D primitive circumscribed by the camera-aligned particle quad. In this case the sample uses a sphere as the imaginary primitive. There three main reasons for choosing a sphere. First, it is always possible to circumscribe a sphere in a camera-aligned quad. Second, a sphere is a very symmetrical shape. It looks the same no matter how you orient it. Third, the intersection between a ray and a sphere is easy to compute. </p>
<p>The main process is as follows. The particles are handled in the same manner as in the 2D technique until they reach the pixel shader. The pixel shader computes a ray from the eye to the pixel being drawn on the quad.</p>
<p>Sample<span>里的体绘制技术产生了粒子的真实</span>3D<span>体而不是</span>2D<span>平面粒子。为了得到这种效果，</span>sample<span>对一个被和屏幕对齐的粒子方块限制的假想的</span>3D<span>物体做光线跟踪得到。在这个粒子中</span>sample<span>使用球形作为假想物体。首先，球可以被限定在一个</span>2D<span>方块中。其次，球是一个对称的图形，不管你从哪个角度看它都是相同的。第三，光线和球的相交很容易计算。</span></p>
<p>&#160;</p>
<p>It then calculates the intersections of this ray and the imaginary sphere circumscribed by the particle quad. If no intersections occur, the ray is discarded. </p>
<p><span>然后计算球和光线的交点，如果没有交点的话，这条光线就被取消。</span></p>
<p>&#160;</p>
<p>Using a fixed step-size, the shader determines the number of steps needed to march from one intersection point to the other. Along the way, several octaves of noise are sampled. These are stored in a 4 channel volume texture. The rgb channels contain the inverse density gradient. The alpha channel contains the density. Lighting is computed at the poing using a combination of the normal from the center of the sphere at the point and the density gradient. Each succesive step is summed with the previous step and the final result is the opacity and color value for the ray traced through the volume. This result is modified slightly by some overall opacity values in order get a specific look. E.g. increasing the g_noiseOpacity parameter will result in denser smoke. </p>
<p><span>使用修正的步数，</span>Shader<span>可以确定从一个交点到另一个交点匹配的步数。用这种方法，几个基于</span>8<span>的噪音被采样。它们被保存在体纹理的</span>4 <span>个通道中。</span>Rgb<span>同胞保存反密度梯度。每个后继步骤结果和前面的步骤累加，这样最后结果就是不透明的，代表光线从体中穿过的颜色。这个结果需要使用一些不透明参数做一些改动以得到特定的效果，比如增加</span>g_noiseOpacity<span>参数能够得到浓密的烟雾。</span></p>
<p>&#160;</p>
<p>If the ray intersects the depth buffer before it exits the sphere, the shader changes the rear exit point to be the depth buffer intersection. Optionally, to achieve the soft intersection with world geometry, the alpha can be attenuated based upon the distance between the sample and the depth buffer. </p>
<p><span>如果光线在它和球面相交之前就和其他物体几何相交，</span>shader<span>回改变后面的射出点，使之成为深度缓存交点。为了可选择的获得和世界中其他物体几何的软相交结果，</span>alpha<span>值可以根据</span>sample<span>点和深度缓存之间的距离来衰减。</span></p>
<p>&#160;</p>
<p><span>硬体粒子系统的例子：</span></p>
<p>&#160;</p>
<p><span>软体粒子系统的例子：</span></p>
<p>&#160;</p>
<h2><a name=Animating_the_Volume_Particles></a>Animating the Volume Particles</h2>
<p>Although the particles are animating (moving away from the source), added detail is gained by animating the texture coordinates used to calculate the lookup in the the noise volume texture. By moving the texture coordinates in one direction, the smoke it made to look like it is moving in the opposite direction. </p>
<p><span>虽然粒子是运动到（从源向外运动），但是也可以通过改变用于查找计算噪音体纹理的纹理坐标来获得附加的细节。通过向一个方向移动纹理坐标，烟雾就会看起来向另外一个方向移动。</span></p>
<img src ="http://www.cnblogs.com/wangdaniu/aggbug/464238.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42816/" target="_blank">[新闻]传阿里投资淘宝超40亿元 应对百度C2C</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>有空的话，打算把新的DX10 Sample翻译一下</title><link>http://www.cnblogs.com/wangdaniu/archive/2006/07/28/462155.html</link><dc:creator>王大牛的幸福生活</dc:creator><author>王大牛的幸福生活</author><pubDate>Fri, 28 Jul 2006 06:49:00 GMT</pubDate><guid>http://www.cnblogs.com/wangdaniu/archive/2006/07/28/462155.html</guid><wfw:comment>http://www.cnblogs.com/wangdaniu/comments/462155.html</wfw:comment><comments>http://www.cnblogs.com/wangdaniu/archive/2006/07/28/462155.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/wangdaniu/comments/commentRss/462155.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/wangdaniu/services/trackbacks/462155.html</trackback:ping><description><![CDATA[att，不知有谁会对这些感兴趣呢？
<img src ="http://www.cnblogs.com/wangdaniu/aggbug/462155.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42815/" target="_blank">[新闻]传雅虎最快本月将宣布收购美国在线</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a hre