virtuosgames / Falcor

Real-Time Rendering Framework
https://developer.nvidia.com/falcor
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Falcor 4.0 Development Snapshot

Falcor is a real-time rendering framework supporting DirectX 12 and Vulkan. It aims to improve productivity of research and prototype projects. Its features include:

Note that Falcor 4.0 is still under development. There will be more changes to the interfaces as well as new features. This is a snapshot of our development branch and doesn't represent an official version (not even alpha). This release only supports DX12 on Windows. The path tracer requires NVAPI. Please make sure you have it setup properly, otherwise the path-tracer won't work. You can find the instructions below.

Prerequisites

On Windows:

NVAPI installation

After cloning the repository, head over to https://developer.nvidia.com/nvapi and download the latest version of NVAPI (this build is tested against version R435).

  1. Extract the content of the zip file into <FalcorRootDir>\Source\Externals\.packman. If you have NVAPI version R435, you should have the <FalcorRootDir>\Source\Externals\.packman\R435-developer folder.
  2. Rename R435-developer to NVAPI. You should end up with the <FalcorRootDir>\Source\Externals\.packman\NVAPI folder.

Building Falcor

Open Falcor.sln and it should build successfully in Visual Studio out of the box. If you wish to skip this step and add Falcor to your own Visual Studio solution directly, follow the instructions below.

Creating a New Project

Sample Class

This is the bootstrapper class of the application. Your class should inherit from it and override its protected methods which serve as the callback functions. A good place to start looking for examples would be the ModelViewer sample.

Build Configurations

Falcor has the following build configurations for DirectX 12, Vulkan and DXR, respectively:

Debug builds enable file logging and message boxes by default, and there is a lot of runtime error checking. If debug layers for the selected API are installed, they will be loaded as well.

Release builds disable logging and most runtime error checks. Use this configuration to measure performance.

Setting Up Debug Layers

To use the DirectX 12 debug layer:

To use Vulkan debug layers:

Falcor Configuration

FalcorConfig.h contains some flags which control Falcor's behavior.

Data Files

Data files include shader files, textures, and models. By default, Falcor looks for data files in the following locations:

To search for a data file, call findFileInDataDirectories().

Shaders

Falcor uses the Slang shading language and compiler. Users can write HLSL/Slang shader code in .hlsl or .slang files. The framework handles cross-compilation to SPIR-V for you when targetting Vulkan; GLSL shaders are not supported.

Deployment

The best practice is to create a directory called "Data/" next to your project file and place all your data files there (shaders/models). If that directory exists, Falcor will copy it to the output directory, making the output directory self-contained (you can zip only the output directory and it should work). If not, you will have to copy the data files yourself.

Citation

If you use Falcor in a research project leading to a publication, please cite the project. The BibTex entry is

@Misc{Benty19,  
   author =      {Nir Benty and Kai-Hwa Yao and Lucy Chen and Tim Foley and Matthew Oakes and Conor Lavelle and Chris Wyman},  
   title =       {The {Falcor} Rendering Framework},  
   year =        {2019},  
   month =       {10},  
   url =         {https://github.com/NVIDIAGameWorks/Falcor},  
   note=         {\url{https://github.com/NVIDIAGameWorks/Falcor}}  
}