Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ Source/Falcor/Rendering
Source/Falcor/Scene
Source/Mogwai
Source/plugins/importers/USDImporter
Source/RenderPasses/PathTracer

# Explicitly whitelisted files
!Source/Falcor/Rendering/Materials/BSDFs
!Source/RenderPasses/DLSSPass/
!Source/Falcor/Utils/fast_vector.h
!Source/Falcor/Rendering/Materials
!Source/Falcor/Scene/Material

10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:
jobs:
windows-vs2022:
name: Windows VS2022
runs-on: windows-latest
runs-on: windows-2022
strategy:
matrix:
include:
- config: Release
- config: Debug
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
submodules: recursive
- name: Setup MSVC
Expand All @@ -34,7 +34,7 @@ jobs:
shell: cmd
windows-ninja-msvc:
name: Windows Ninja/MSVC
runs-on: windows-latest
runs-on: windows-2022
env:
CMAKE_EXE: tools\.packman\cmake\bin\cmake.exe
CMAKE_BUILD_PRESET: windows-ninja-msvc
Expand All @@ -45,7 +45,7 @@ jobs:
- config: Debug
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
submodules: recursive
- name: Setup MSVC
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- config: Debug
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
submodules: recursive
- name: Setup system dependencies
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Test output folder.
/tests/data/
/test-results/

# Media folders.
/media
Expand Down Expand Up @@ -31,3 +32,7 @@
*.tlog
*.bak
*.swp

token.txt

customjob.yml
20 changes: 0 additions & 20 deletions .vscode-default/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,5 @@
],
"visualizerFile": "${workspaceFolder}/Source/Falcor/Falcor.natvis"
},
{
// Launch configuration for Python example.
"name": "Python Example",
"type": "cppvsdbg",
"request": "launch",
"windows": {
"program": "${config:python.defaultInterpreterPath}"
},
"args": [ "${workspaceFolder}/scripts/internal/python/simple.py" ],
"stopAtEntry": false,
"cwd": "${command:cmake.launchTargetDirectory}",
"environment": [
{
"name": "FALCOR_DEVMODE",
"value": "1"
}
],
"internalConsoleOptions": "openOnSessionStart",
"visualizerFile": "${workspaceFolder}/Source/Falcor/Falcor.natvis"
}
]
}
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set_property(CACHE FALCOR_ENABLE_ASSERTS PROPERTY STRINGS AUTO ON OFF)
# Enable/disable the profiler.
set(FALCOR_ENABLE_PROFILER ON CACHE BOOL "Enable profiler")

# Enable/disable using system Python distribution. This requires Python 3.7 to be available.
# Enable/disable using system Python distribution.
set(FALCOR_USE_SYSTEM_PYTHON OFF CACHE BOOL "Use system Python distribution")

# Enable/disable USD.
Expand Down Expand Up @@ -123,7 +123,6 @@ endif()
# CUDA
# -----------------------------------------------------------------------------


# Set default CUDA architecture to 75 (Turing).
# This can be overwritten for individual targets using the CUDA_ARCHITECTURE property.
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
Expand Down Expand Up @@ -177,11 +176,11 @@ if(NOT SETUP_CONFIGURATION_TYPES)

if(CMAKE_CONFIGURATION_TYPES)
# multi config generator
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE STRING "" FORCE)
else()
# single config generator
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY HELPSTRING "Choose the type of build")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo")
endif()
endif()

Expand Down Expand Up @@ -266,7 +265,7 @@ function(target_copy_shaders target output_dir)
)
endif()
endforeach()
endfunction()
endfunction()

# -----------------------------------------------------------------------------
# Data file handling
Expand Down
36 changes: 36 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
"configurePreset": "windows-ninja-msvc",
"configuration": "Release"
},
{
"name": "windows-ninja-msvc-relwithdebinfo",
"displayName": "RelWithDebInfo",
"configurePreset": "windows-ninja-msvc",
"configuration": "RelWithDebInfo"
},
{
"name": "windows-ninja-msvc-debug",
"displayName": "Debug",
Expand All @@ -184,6 +190,12 @@
"configurePreset": "windows-ninja-msvc-ci",
"configuration": "Release"
},
{
"name": "windows-ninja-msvc-ci-relwithdebinfo",
"displayName": "RelWithDebInfo",
"configurePreset": "windows-ninja-msvc-ci",
"configuration": "RelWithDebInfo"
},
{
"name": "windows-ninja-msvc-ci-debug",
"displayName": "Debug",
Expand All @@ -196,6 +208,12 @@
"configurePreset": "linux-clang",
"configuration": "Release"
},
{
"name": "linux-clang-relwithdebinfo",
"displayName": "RelWithDebInfo",
"configurePreset": "linux-clang",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-clang-debug",
"displayName": "Debug",
Expand All @@ -208,6 +226,12 @@
"configurePreset": "linux-clang-ci",
"configuration": "Release"
},
{
"name": "linux-clang-ci-relwithdebinfo",
"displayName": "RelWithDebInfo",
"configurePreset": "linux-clang-ci",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-clang-ci-debug",
"displayName": "Debug",
Expand All @@ -220,6 +244,12 @@
"configurePreset": "linux-gcc",
"configuration": "Release"
},
{
"name": "linux-gcc-relwithdebinfo",
"displayName": "RelWithDebInfo",
"configurePreset": "linux-gcc",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-gcc-debug",
"displayName": "Debug",
Expand All @@ -232,6 +262,12 @@
"configurePreset": "linux-gcc-ci",
"configuration": "Release"
},
{
"name": "linux-gcc-ci-relwithdebinfo",
"displayName": "RelWithDebInfo",
"configurePreset": "linux-gcc-ci",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-gcc-ci-debug",
"displayName": "Debug",
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,29 @@ Features include:
* Raytracing support
* Python scripting support
* Render graph system to build modular renderers
* Common rendering techniques such post-processing effects
* Common rendering techniques such as post-processing effects
* Unbiased path tracer
* Advanced variance reduction techniques like ReSTIR PT Enhanced
* Integration of various RTX SDKs such as DLSS, RTXDI and NRD

## Prerequisites
- Windows 10 version 20H2 (October 2020 Update) or newer, OS build revision .789 or newer
- Visual Studio 2022
- [Windows 10 SDK (10.0.19041.0) for Windows 10, version 2004](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/)
- A GPU which supports DirectX Raytracing, such as the NVIDIA Titan V or GeForce RTX
- NVIDIA driver 466.11 or newer
- NVIDIA driver 535 or newer

Optional:
- Windows 10 Graphics Tools. To run DirectX 12 applications with the debug layer enabled, you must install this. There are two ways to install it:
- Click the Windows button and type `Optional Features`, in the window that opens click `Add a feature` and select `Graphics Tools`.
- Download an offline package from [here](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/windows-hardware-lab-kit#supplemental-content-for-graphics-media-and-mean-time-between-failures-mtbf-tests). Choose a ZIP file that matches the OS version you are using (not the SDK version used for building Falcor). The ZIP includes a document which explains how to install the graphics tools.
- NVAPI, CUDA, OptiX (see below)
- CUDA, OptiX (see below)

## Building Falcor
Falcor uses the [CMake](https://cmake.org) build system. Additional information on how to use Falcor with CMake is available in the [CMake](docs/development/cmake.md) development documetation page.
Falcor uses the [CMake](https://cmake.org) build system. Additional information on how to use Falcor with CMake is available in the [CMake](docs/development/cmake.md) development documentation page.

### Visual Studio
If you are working with Visual Studio 2022, you can setup a native Visual Studio solution by running `setup_vs2022.bat` after cloning this repository. The solution files are written to `build/windows-vs2022` and the binary output is located in `build/windows-vs2022/bin`.
If you are working with Visual Studio 2022, you can set up a native Visual Studio solution by running `setup_vs2022.bat` after cloning this repository. The solution files are written to `build/windows-vs2022` and the binary output is located in `build/windows-vs2022/bin`.

### Visual Studio Code
If you are working with Visual Studio Code, run `setup.bat` after cloning this repository. This will setup a VS Code workspace in the `.vscode` folder with sensible defaults (only if `.vscode` does not exist yet). When opening the project folder in VS Code, it will prompt to install recommended extensions. We recommend you do, but at least make sure that _CMake Tools_ is installed. To build Falcor, you can select the configure preset by executing the _CMake: Select Configure Preset_ action (Ctrl+Shift+P). Choose the _Windows Ninja/MSVC_ preset. Then simply hit _Build_ (or press F7) to build the project. The binary output is located in `build/windows-ninja-msvc/bin`.
Expand All @@ -47,7 +48,7 @@ sudo apt install xorg-dev libgtk-3-dev
You can use the same instructions for building Falcor as described in the _Visual Studio Code_ section above, simply choose the _Linux/GCC_ preset.

### Configure Presets
Falcor uses _CMake Presets_ store in `CMakePresets.json` to provide a set of commonly used build configurations. You can get the full list of available configure presets running `cmake --list-presets`:
Falcor uses _CMake Presets_ stored in `CMakePresets.json` to provide a set of commonly used build configurations. You can get the full list of available configure presets running `cmake --list-presets`:

```
$ cmake --list-presets
Expand All @@ -69,10 +70,6 @@ For more information on how to use Falcor as a Python module see [Falcor In Pyth
## Microsoft DirectX 12 Agility SDK
Falcor uses the [Microsoft DirectX 12 Agility SDK](https://devblogs.microsoft.com/directx/directx12agility/) to get access to the latest DirectX 12 features. Applications can enable the Agility SDK by putting `FALCOR_EXPORT_D3D12_AGILITY_SDK` in the main `.cpp` file. `Mogwai`, `FalcorTest` and `RenderGraphEditor` have the Agility SDK enabled by default.

## NVAPI
To enable NVAPI support, head over to https://developer.nvidia.com/nvapi and download the latest version of NVAPI (this build is tested against version R535).
Extract the content of the zip file into `external/packman/` and rename `R535-developer` to `nvapi`.

## NSight Aftermath
To enable NSight Aftermath support, head over to https://developer.nvidia.com/nsight-aftermath and download the latest version of Aftermath (this build is tested against version 2023.1).
Extract the content of the zip file into `external/packman/aftermath`.
Expand All @@ -83,7 +80,7 @@ To enable CUDA support, download and install [CUDA 11.6.2](https://developer.nvi
See the `CudaInterop` sample application located in `Source/Samples/CudaInterop` for an example of how to use CUDA.

## OptiX
If you want to use Falcor's OptiX functionality (specifically the `OptixDenoiser` render pass) download the [OptiX SDK](https://developer.nvidia.com/designworks/optix/download) (Falcor is currently tested against OptiX version 7.3) After running the installer, link or copy the OptiX SDK folder into `external/packman/optix` (i.e., file `external/packman/optix/include/optix.h` should exist).
If you want to use Falcor's OptiX functionality (specifically the `OptixDenoiser` render pass) download the [OptiX SDK](https://developer.nvidia.com/designworks/optix/download) (Falcor is currently tested against OptiX version 8.0) After running the installer, link or copy the OptiX SDK folder into `external/packman/optix` (i.e., file `external/packman/optix/include/optix.h` should exist).

Note: You also need CUDA installed to compile the `OptixDenoiser` render pass, see above for details.

Expand All @@ -107,7 +104,7 @@ Note that these SDKs are not under the same license as Falcor, see [LICENSE.md](

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

```bibtex
@Misc{Kallweit22,
Expand Down
4 changes: 2 additions & 2 deletions Source/Falcor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ target_sources(Falcor PRIVATE
Scene/SceneCache.h
Scene/SceneDefines.slangh
Scene/SceneIDs.h
Scene/SceneIDsPython.cpp
Scene/SceneRayQueryInterface.slang
Scene/SceneTypes.slang
Scene/Shading.slang
Expand Down Expand Up @@ -556,7 +557,6 @@ target_sources(Falcor PRIVATE
Utils/NVAPI.slang
Utils/NVAPI.slangh
Utils/ObjectID.h
Utils/ObjectIDPython.h
Utils/PathResolving.cpp
Utils/PathResolving.h
Utils/Properties.cpp
Expand Down Expand Up @@ -932,7 +932,7 @@ endif()

target_compile_definitions(Falcor
PUBLIC
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:Release,RelWithDebInfo>:NDEBUG>
$<$<CONFIG:Debug>:_DEBUG>
# Windows.
$<$<PLATFORM_ID:Windows>:NOMINMAX> # do not define min/max macros
Expand Down
1 change: 1 addition & 0 deletions Source/Falcor/Core/API/Aftermath.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include "Core/Macros.h"

#include <cstdint>
#include <string_view>

namespace Falcor
Expand Down
Loading
Loading