GitHub - GPUOpen-Effects/TressFX at 3.1.1 (original) (raw)

AMD TressFX

AMD TressFX

The TressFX library implements AMD's TressFX hair/fur rendering and simulation technology for DirectX 11. The TressFX technology uses the GPU to simulate and render high-quality, realistic hair and fur. TressFX makes use of the processing power of high-performance GPUs to do realistic rendering and utilizes DirectCompute to physically simulate each individual strand of hair.

Latest release

Highlights include the following:

Prerequisites

Getting started

Start with the TressFX viewer to see example content or to check out the code.

For authoring new content, documentation for the Maya exporter is available in the amd_tressfx_tools\MayaPlugin\doc directory.

ShortCut

ShortCut is our new Order Independent Transparency (OIT) option. It is inspired by the method presented by Eidos-Montréal and Hybrid Transparency. Whereas our original method focused on the front k = 8 layers of hair, ShortCut is good for cases when you can get away with k = 2 or 3, and you’re more concerned about memory usage.

It does require some forethought on how to build your models, however, as it comes with different performance characteristics, and a quality trade-off. But between the simpler memory bounds and the potential for higher performance, we expect it to be a popular choice.

The four main steps are outlined below:

  1. Render hair geometry, using a sequence of InterlockedMin calls to update the list of k nearest fragments while computing an overall alpha.
  2. Screen space pass that puts the kth nearest depth in the depth buffer for early z culling in the next step.
  3. Render hair geometry again. Shade the fragment and write or blend the color (depending on variant). [earlydepthstencil] focuses shading cost on the front k.
  4. Screen space pass that does the final blending.

Learn More

Premake

The Visual Studio solutions and projects in this repo were generated with Premake. If you need to regenerate the Visual Studio files, double-click on gpuopen_tressfx_update_vs_files.bat in the premake directory.

This version of Premake has been modified from the stock version to use the property sheet technique for the Windows SDK from this Visual C++ Team blog post. The technique was originally described for using the Windows 8.0 SDK with Visual Studio 2010, but it applies more generally to using newer versions of the Windows SDK with older versions of Visual Studio.

The default SDK for a particular version of Visual Studio (for 2012 or higher) is installed as part of Visual Studio installation. This default (Windows 8.0 SDK for Visual Studio 2012 and Windows 8.1 SDK for Visual Studio 2013) will be used if newer SDKs do not exist on the user's machine. However, the projects generated with this version of Premake will use the next higher SDK (Windows 8.1 SDK for Visual Studio 2012 and Windows 10 SDK with Visual Studio 2013), if the newer SDKs exist on the user's machine.

For Visual Studio 2015, this version of Premake adds the WindowsTargetPlatformVersion element to the project file to specify which version of the Windows SDK will be used. To change WindowsTargetPlatformVersion for Visual Studio 2015, change the value for _AMD_WIN_SDK_VERSION in premake\amd_premake_util.lua and regenerate the Visual Studio files.

Third-Party Software

DXUT and ContentExporter are only needed for the viewer, not the core library. Only first-party software (specifically amd_tressfx, and amd_lib) is needed to build the TressFX library.

Attribution