Skip to content

Commit

Permalink
Falcor 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV authored Oct 20, 2023
1 parent 79ed2ee commit 95b5163
Show file tree
Hide file tree
Showing 792 changed files with 29,626 additions and 14,043 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DerivePointerAlignment: false
PointerAlignment: Left
FixNamespaceComments: true

BinPackArguments: false
AllowAllConstructorInitializersOnNextLine: true
BreakConstructorInitializers: BeforeComma
AlwaysBreakTemplateDeclarations: true
Expand Down Expand Up @@ -62,6 +63,7 @@ DerivePointerAlignment: false
PointerAlignment: Left
FixNamespaceComments: true

BinPackArguments: false
AllowAllConstructorInitializersOnNextLine: true
BreakConstructorInitializers: BeforeComma
AlwaysBreakTemplateDeclarations: true
Expand Down
3 changes: 2 additions & 1 deletion .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ Source/Falcor/Rendering
Source/Falcor/Scene
Source/Mogwai
Source/plugins/importers/USDImporter
Source/RenderPasses
Source/RenderPasses/PathTracer

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

44 changes: 37 additions & 7 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ on:
pull_request:
branches: ["master"]

env:
CMAKE_EXE: tools\.packman\cmake\bin\cmake.exe
CMAKE_BUILD_PRESET: windows-ninja-msvc-ci
CMAKE_BUILD_CONFIG: Release

jobs:
windows:
name: Windows/MSVC
name: Windows Ninja/MSVC
runs-on: windows-latest
env:
CMAKE_EXE: tools\.packman\cmake\bin\cmake.exe
CMAKE_BUILD_PRESET: windows-ninja-msvc
strategy:
matrix:
include:
- config: Release
- config: Debug
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -30,5 +33,32 @@ jobs:
- name: Build
run: |
%CMAKE_EXE% --preset %CMAKE_BUILD_PRESET%
%CMAKE_EXE% --build build/%CMAKE_BUILD_PRESET% --config %CMAKE_BUILD_CONFIG%
%CMAKE_EXE% --build build/%CMAKE_BUILD_PRESET% --config ${{ matrix.config }}
shell: cmd
linux:
name: Linux/GCC
runs-on: ubuntu-22.04
env:
CMAKE_EXE: ./tools/.packman/cmake/bin/cmake
CMAKE_BUILD_PRESET: linux-gcc
strategy:
matrix:
include:
- config: Release
- config: Debug
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install system dependencies
run: sudo apt install -y xorg-dev libgtk-3-dev
shell: bash
- name: Setup
run: ./setup.sh
shell: bash
- name: Build
run: |
${CMAKE_EXE} --preset ${CMAKE_BUILD_PRESET}
${CMAKE_EXE} --build build/${CMAKE_BUILD_PRESET} --config ${{ matrix.config }}
shell: bash
3 changes: 2 additions & 1 deletion .vscode-default/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"josetr.cmake-language-support-vscode",
"shader-slang.slang-language-extension"
"shader-slang.slang-language-extension",
"ms-python.python"
]
}
3 changes: 2 additions & 1 deletion .vscode-default/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
},
"cmake.configureOnEdit": false,
"C_Cpp.clang_format_path": "${workspaceFolder}/tools/.packman/clang-format/clang-format",
"slang.format.clangFormatLocation": "${workspaceFolder}/tools/.packman/clang-format/clang-format"
"slang.format.clangFormatLocation": "${workspaceFolder}/tools/.packman/clang-format/clang-format",
"cmake.useProjectStatusView": false
}
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ project(Falcor
# Configuration options
# -----------------------------------------------------------------------------

# Enable/disable reporting Falcor exceptions as fatal errors before actually throwing them.
# This allows to break into the debugger at the location where an exception is thrown.
set(FALCOR_REPORT_EXCEPTION_AS_ERROR OFF CACHE BOOL "Report Falcor exceptions as fatal errors (and break into debugger)")
# Enable/disable asserts. AUTO enables asserts in debug builds.
set(FALCOR_ENABLE_ASSERTS "AUTO" CACHE STRING "Enable asserts")
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.
set(FALCOR_USE_SYSTEM_PYTHON OFF CACHE BOOL "Use system Python distribution")
Expand Down Expand Up @@ -429,6 +432,7 @@ endif()
# -----------------------------------------------------------------------------

add_subdirectory(Source/Falcor)
add_subdirectory(Source/Modules)
add_subdirectory(Source/Mogwai)
add_subdirectory(Source/plugins)
add_subdirectory(Source/RenderPasses)
Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ Falcor uses the [CMake](https://cmake.org) build system. Additional information
### 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`.


### 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 (or one for a different rendering backend). Then simply hit _Build_ (or press F7) to build the project. The binary output is located in `build/windows-ninja-msvc/bin`.
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`.

Warning: Do not start VS Code from _Git Bash_, it will modify the `PATH` environment variable to an incompatible format, leading to issues with CMake.

### Linux
Falcor has experimental support for Ubuntu 22.04. To build Falcor on Linux, run `setup.sh` after cloning this repository. You also need to install some system library headers using:

```
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`:

Expand All @@ -55,14 +63,15 @@ Use `cmake --preset <preset name>` to generate the build tree for a given preset

An existing build tree can be compiled using `cmake --build build/<preset name>`.

Note: Some render passes (RTXGI, RTXDI, DLSS in particular) are not fully working with the new Slang GFX backend.
## Falcor In Python
For more information on how to use Falcor as a Python module see [Falcor In Python](docs/falcor-in-python.md).

## 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 R520).
Extract the content of the zip file into `external/packman/` and rename `R520-developer` to `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).
Expand All @@ -82,17 +91,11 @@ Note: You also need CUDA installed to compile the `OptixDenoiser` render pass, s
Falcor ships with the following NVIDIA RTX SDKs:

- DLSS (https://github.com/NVIDIA/DLSS)
- RTXGI (https://github.com/NVIDIAGameWorks/RTXGI)
- RTXDI (https://github.com/NVIDIAGameWorks/RTXDI)
- NRD (https://github.com/NVIDIAGameWorks/RayTracingDenoiser)

Note that these SDKs are not under the same license as Falcor, see [LICENSE.md](LICENSE.md) for details.

## Falcor Configuration
`FalcorConfig.h` contains some flags which control Falcor's behavior.
- `FALCOR_ENABLE_LOGGER` - Enable/disable the logger. By default, it is set to `1`.
- `FALCOR_ENABLE_PROFILER` - Enable/disable the internal CPU/GPU profiler. By default, it is set to `1`.

## Resources
- [Falcor](https://github.com/NVIDIAGameWorks/Falcor): Falcor's GitHub page.
- [Documentation](./docs/index.md): Additional information and tutorials.
Expand Down
Loading

0 comments on commit 95b5163

Please sign in to comment.