Releases: NVIDIAGameWorks/Falcor
Falcor 8.0
8.0
Overview
- Added base classes to
Scene
andLightCollection
- Fixes and additions to differentiable path tracer.
- Switched to new Slang version with API changes.
- Support for Scenes larger than 4GB.
Dependencies
- Update slang to version
2024.1.34
- Use new slang API for disabling compiler warnings.
- Disable slang
reinterpret
size mismatch warning to reduce diagnostic noise.
Python
- Add UI interface functions to
Testbed
. - Moved the per-frame python callback that allows modifying Scene to Mogwai.
- Add python interface to Device to query available adapters.
- Add error check if no GPU is found.
- Added a convenience camera dump output formatted so it can be directly pasted into .pyscene.
Importers
- Added a scene importer for Mitsuba 3 XML scene files (based on what @skallweit had a few years ago).
- The importer supports a subset of the Mitsuba scene descriptions (see README.md).
- Improvements to make discovery of USD material shaders more robust.
- Add
usdz
to list of supported file types.
Passes
- Refactored the return value of InternalPathTracer's traceRay calls.
- Added a new "overlayUI" feature to Mogwai which allows users to draw simple primitives over the final rendered image. This is very helpful for debugging and visualizing aspects of various experiments.
- SceneDebugger can now visualize content of VBuffer, rather than always tracing its primary rays.
- Enable the pixel debugger for per pixel debug printing in the SceneDebugger pass.
- Add support for visualizing
BSDFProperties
inSceneDebugger
.
Differentiable path tracer
- Fix the condition for
computeEmissive
. - Fix a division-by-zero issue (which causes NaNs during
bwd_diff
) by checkingbsdfSample.pdf > 0
. - Change shape optimization examples with
max_bounces=2
. - Extend
SceneGradients
to allow more gradient types:MeshPosition
,MeshNormal
, andMeshTangent
. - Add custom derivative functions in
DiffSceneIO.slang
to backprop gradients of mesh vertices. - Add an inverse rendering example that optimizes the translation and the rotation angle of the bunny.
- Add an inverse rendering example that morphs a sphere to a bunny.
Scene
Scene
now has a base classIScene
to allow alternative Scene implementations.- Switched
RTXDI
to useIScene
- Switched
ScreenSpaceReSTIR
to useIScene
- Switched
GridVolumeSampler
to useIScene
- Switched
LightCollection
now has a base classILightCollection
so different alternative implementations are easier to intergrate.EmissiveLightSamplers
now operate onILightCollection
instead of on Scene.
- Changed the
setRaytracingShaderData
tobindShaderDataForRaytracing
to have singature that's more aligned withbindShaderData
- Removed several unnecessary
bindShaderData
calls (followed bybindShaderDataForRaytracing
that already binds those). - Removed several unnecessary
bindShaderDataForRaytracing
calls (followed byIScene::raytrace
that already binds those).
- Removed several unnecessary
- Renamed
getActiveLights
togetActiveAnalyticLights
to make it clear which lights are these (in line withuseAnalyticLights
) - Removed the
getActiveLightCount
andgetActiveLight
as they are not necessary. - Refactored
VertexData
to a separate file, to not require importing all SceneTypes when using it. - Refactored
MaterialInstanceHints
into its own file, so they can be used in interface without pulling fullMaterialInstance
in. (Breaks cyclic dependencies down the line) - Added
unpackHitInfo
method on Scene so it is easier to specialize when needed. - Scene's
HitData
now returnsPackedHitInfo
via apack()
call, putting it in line with other structs returning their packed form via apack()
call. The fact that HitData already containsPackedHitInfo
and no work is done should be an implementation detail, not reflected in the method name. - Added default argument values to
SceneRayQuery
calls. - Added
UpdateFlagsCallback
toScene
, that allows having callback called whenSceneUpdateFlags
are changed, so the update flags are accumulated in the listener rather thanScene
. To avoid missing updates when the flags are not acted on right away. - Added SplitBuffer type, that handles buffers larger than 4GB, for up to 4 billion items.
- Top bits of an index are used to select a GPU buffer.
- Vertex data is no longer uploaded inside
AnimationController
, but along with Index data it is uploaded when copied into Scene. - Changed
splitMeshGroupMidpointMeshes
behavior in the case where one side of the split ended up empty. This can happen when long skinny triangles make the bbox very imbalanced with respect to the actual triangle centroids. Previously, we would just give up on splitting the group, ending with possible very large groups. New approach just sorts the meshes by their centroids on the axis that was deemed to be the best split axis, and splits the group in half.
Error Handling
- Add checks in parameter block init for invalid use of arrays of textures on vulkan (which previous failed silenetly)
- Note: Checked perf in profiler - effect is negligible compared to cost of the rest of the function
- Turned warning on 4GB buffers into an exception, as it actually affects the renderer's results.
- Add unit test for nested arrays of textures.
- Add unit tests for Slang generics in interfaces.
- Add unit tests for floating-point atomics.
General
- Structured buffers are now created without a UAV counter by default.
- Buffer views are now based on byte ranges, not element ranges.
Buffer::getSRV()
andBuffer::getUAV()
now take a byte range instead of element range.- Allow USD variant set selection to be overridden through attributes.
- Moved LightProfile handling to MaterialSystem as it is more (emissive) Material than Scene related.
- Update the VNDF sampling function to use the latest spherical cap sampling technique (HPG 2023 paper)
- "Sampling Visible GGX Normals with Spherical Caps" by Dupuy and Benyoub [2023]. See https://www.intel.com/content/www/us/en/developer/articles/technical/sampling-visible-ggx-normals.html
- Make available all imported asset paths and associated material dictionaries
- Add support for shared resources (CUDA) on Vulkan/Linux.
- Added support for 16b images.
- Dropped code that would mistakenly interpret 16b images as Float16.
- Added a flag for saving EXRs in half floats.
- If the input texture is 16b EXR, we automatically set the
Bitmap::ImportFlags::ConvertToFloat16
to conserve GPU memory. - Add
Bitmap::ImportFlags
to specify import options, and pass import flags through texture loading functions. - Add flag for converting HDR images to 16-bit format upon texture load.
- Remove unused lod parameter to
prepareShadingData()
. - Add tracking of texture ownership in
TextureManager
.- Free textures no longer in use when removing materials.
- Add interface for querying memory usage on
Scene
and some utility classes. - Add
TextureManager::getUdimIDs()
helper to get list of UDIM IDs for a texture handle. - Remove
Buffer::MapType
enum. - Change the script name to
run_material_optimization.py
for consistency. - Added LOD parameter to environment map sampler function.
Bug fixes
- Fixes a discrepancy between Python and C++ default values when creating grids.
- Fixed a possible bug where, if the Assimp importer skipped a mesh, the meshMap would get out of sync with the meshes in the actual aiScene.
- Fixed bug when
LightCollection
was rebuilt inScene
(onEmissiveMaterialsChanged
).LightBVHSampler
andEmissionPowerSampler
were still operating on the oldLightCollection
object, which was no longer the same object held byScene
. - Fix issue with loading filtered attributes from json
- MaterialSystem now re-evaluates the Metadata after calling
update()
, to make sure it reports enough texture slots. Can be removed pending fix to unbounded buffers. - Fix PBRT coated and dielectric materials bug.
Bitmap::getSize()
is now 64b to avoid crashes on 16k textures.- BakedTexture calculates sizes in size_t to match the
Bitmap::getSize()
- Fix issue with refinement of left-handed subdivs.
- Fix 2D multi-sampled texture resolving.
Refactored Attributes and Settings to be more streamlined for the actual usage.
- Added AttributeFilters, to allow attaching attributes to shapes based on the name regex lookup. The new syntax for a filter is:
{ "name": "name of the filter", "regex": "shape_name_to_apply_to.*", "attributes": {"attr":"ibutes","applied":"to","all":"matching","names":1}}
- The
name
andregex
are optional. Ifregex
is not specified, theattributes
are applied to all shapes (equal to regex.*
) - If neither
name
norregex
are required, theattributes
can be unnested like so:{"attr":"ibutes","applied":"to","all":"matching","names":1}
- This supercedes the previous
attribute.filter
syntax for assigning attributes to all shapes with matching names or all shapes with not matching names. - To attach an attribute to all shapes not matching a name, first create a filter that applies the attribute to all shapes, and then create an attribute that applies the attribute with
null
value to the shapes that are not supposed to have it. This unsets the attribute for the given shapes. - All filters are applied in the order in which they were added, and it is possible to add an array of filters at once.
- Refactored the Settings class to be streamlined with the new AttributeFilters pattern.
- Refactored Options handling to match the Attribute handling (except there is no
regex
) - The lookup can now only be done by fully qualified name, e.g.
usdImporter:dropPrim
7.0
Overview
This release of Falcor provides the following significant improvements and new features:
- Falcor as a Python extension, allowing Falcor to be used directly from Python.
- CUDA interop, including sharing buffers and synchronization between Falcor and CUDA.
- PyTorch interop, allowing Falcor to be used for implementing PyTorch functions.
- Differentiable Slang and various examples including a BSDF optimizer and a differentiable path tracer.
- Support for Shader Execution Reordering (SER) in the path tracer.
Dependencies
- Update
slang
to version2023.3.20
. - Update
nvapi
to versionR535
. - Update
DLSS
to version3.5
.
Build System
- Enable more MSVC warnings.
- Add
FALCOR_ENABLE_ASSERTS
CMake option. - Remove
FALCOR_REPORT_EXCEPTION_AS_ERROR
CMake option.
Assets
- Fix media files to use relative paths.
- Move volume test scenes to media package.
- Move
grey_and_white_room
scene tofalcor_media
. - Replace
Cerberus
withCesiumMan
.
Examples
- Add a simple example showing interop between Falcor and pytroch, learning to represent an image from a set of gaussians.
- Add Slang based BC7 compressor.
DiffSlang
- Add a
BSDFOptimizer
that can run simple inverse rendering for solving material parameters without any path tracing. - Add a differentiable
evalAD
function toIMaterialInstance
and a differentiablesetupDiffMaterialInstance
toIMaterial
. - Implement
evalAD
andsetupDiffMaterialInstance
forPBRTDiffuseMaterial
. Other types of materials have naive placeholders for now. - Add a helper class
GradientIOWrapper
to set up the dataflow of scene gradients during backpropagation. - Mark
ShadingData
andShadingFrame
asIDifferentiable
. - Add a unit test to check
evalAD
ofPBRTDiffuseMaterial
.
Add helper classes for differentiable rendering: SceneManager
: get/set scene parameters (only apply to the albedo value ofPBRTDiffuse
for now).SceneGradients
: store scene gradients from backpropagation.
Python API
- Add interface for passing in an already created
Device
toTestbed
. - Add Python bindings for accessing
Buffer
as pytorch tensor. - Add Python bindings for CUDA/Falcor sync.
- Add Python bindings for
Program
,ProgramDesc
andComputePass
. - Add a simple example using compute shaders from Python.
- Fix
EnvMap
Python constructor (they can't return null which we did when the file isn't found). - Improve
Testbed
:- Add shader reloading on
F5
- Fix profiler toggling and render profiler even if UI is disabled
- Fix
show_ui
- Add
render_texture
for setting a texture to be rendered on the window - Add
should_close
andclose
method for handling shutdown - Cleanup + comments
- Add shader reloading on
- Add Python bindings for program reflection types.
- Add Python bindings for
ShaderVar
. - Add Python bindings to
Texture
for reading/writing subresources as numpy arrays. - Add Python bindings to
Buffer
class:- Buffer properties
to_numpy
/from_numpy
to convert to/from numpy arrays
- Add Python bindings to
Device
class:create_buffer
,create_typed_buffer
andcreate_structured_buffer
- Add initial Python bindings to
CopyContext
class. - Add Python unit tests for buffer creation, writing and reading from/to numpy arrays.
- Add
pybind11::falcor_enum
helper to allow binding enums that already have string infos (usingFALCOR_ENUM_INFO
). - Include
pybind11/functional.h
to get correct typing information onstd::function
types. - Add Python bindings for
Sampler
class. - Add
[]
accessor toRenderGraph
Python bindings, allowing to access a pass throughg["PathTracer"]
for example. - Add basic ImGUI wrapper with Python bindings in
falcor.ui
submodule. - Only render UI for render graph / scene when they one is loaded.
- Add implicit conversion from python lists to vector types (allow assigning
[10, 20, 30]
instead offloat3(10, 20, 30)
). - Python bindings for creating profiler events.
Cleanup
- Cleanup use of
$for..
loops in shaders. - Add comment about usage of
SlangCompilationFlags::DumpIntermediates
. - Rename
computeNewRayOrigin()
tocomputeRayOrigin()
. - Rename
setShaderData
tobindShaderData
. - Add
FALCOR_EXPORT_D3D12_AGILITY_SDK
to all sample applications. - Apply
clang-format
on most render passes. - Remove
PythonDictionary
class. - Rename
InternalDictionary
toDictionary
. - Disable
clang-format
argument bin packing.
Error Handling
- Fix
fstd::source_location::current()
on MSVC. - Take
std::string_view
as message onException
and descendants. Simplify the exception classes as they don't need to do string formatting anymore. FALCOR_GFX_CALL
(gfxReportError
handler) now handles NVIDIA Aftermath crash dumps before callingreportFatalErrorAndTerminate
.msgBox
creates a window that is always top-most (otherwise we got hidden windows if the main window was not open / already closed).- Fix
getStackTrace
(need to create theTraceResolver
first). - Assertions now throw
AssertionError
exceptions which translate to Python. - Add support for string message (and formatting) with
FALCOR_ASSERT
. - Add
ErrorDiagnosticFlags
to control how errors are reported:BreakOnThrow
enables breaking into attached debugger when callingFALCOR_THROW
(break on call-site).BreakOnAssert
enables breaking into attached debugger when callingFALCOR_ASSERT
(break on call-site).AppendStackTrace
enables appending a stack trace to the exception message when callingFALCOR_THROW
andFALCOR_ASSERT
.ShowMessageBoxOnError
enables showing a message box when calling thereportError
family of functions.
- Change
reportError
intoreportErrorAndContinue
to better describe what it is doing. This function no longer terminates the application. - Change
reportErrorAndAllowRetry
to returntrue
if user clickedRetry
. This function no longer terminates the application. - Change
reportFatalError
intoreportFatalErrorAndTerminate
to better describe what it is doing. - Add
catchAndReportAllExceptions
that is now used in all sample applications to globally catch errors. - Remove the local exception catching in
SampleApp::run
. - Fix places where before we relied on application termination when using
reportErrorAndAllowRetry
. We now throw an exception. - Replace calls to
reportError
with either one of these: exceptions, logging, show message box. - Consolidate
Core/Assert.h
,Core/Errors.h
andCore/ErrorHandling.h
intoCore/Error.h
. - Simplify error handling conventions in Falcor:
- Use
static_assert
andFALCOR_ASSERT
for assertions. - Use
FALCOR_THROW
andFALCOR_CHECK
to throwRuntimeError
exception. - Remove
ArgumentError
. - Remove
checkArgument
andcheckInvariant
and just useFALCOR_CHECK
. - Replace all use of the
FALCOR_CHECK_ARG_XXX
macros with justFALCOR_CHECK
. - Make
FALCOR_UNIMPLEMENTED
andFALCOR_UNREACHABLE
throw exceptions instead of being assertions.
- Use
- Adjust conventions in
error-handling.md
.
Core
- Rename
RenderContext::flush
toRenderContext::submit
. - Rename
Device::flushAndSync
toDevice::wait
. - Move state object creation to
Device
and simplify description structs. - Remove profiler calls around
Swapchain::present()
(these calls crash on Vulkan and we probably don't need them so let's just get rid of them). - Remove
ProgramDesc::languagePrelude
andProgram::setLanguagePrelude
. - Add error checks for texture resource view creation that the right bind flags are set.
- Rename
TextureManager::TextureHandle
toTextureManager::CpuTextureHandle
to avoid name clash with GPU-sideTextureHandle
. - Add convenience functions to convert between CPU and GPU texture handles.
- Update
TextureManager
for safe resolve of UDIMs. - Disable logging to a file when using Falcor from Python. Without this we litter the runtime folder with
python.exe.X.log
files. - Add native
AdapterLUID
andAdapterInfo
classes inDevice.h
. - Rename
GpuFence
toFence
. - Introduce
FenceDesc
andFence::getDesc
. - Add
CopyContext::signal
andCopyContext::wait
to handle fence signaling and waiting on the command queue. - Remove
GpuFence::syncGpu
, instead clients need to callCopyContext::wait
. - Rename
GpuFence::syncCpu
toFence::wait
. - Introduce signaled value which represents the last signaled value of the fence (this replaces the CPU value, which was always the last signaled value + 1).
- Introduce
Fence::kAuto
which replaces thestd::optional
we used before to differentiate between signaling specific fence values or auto-incrementing. - Add
Fence::updateSignaledValue
which any signaler (host, device, external) can use to update the signaled value and/or get the auto-incremented value to signal. - Introduce timeout when waiting on fence on host.
- Improve error handling for setting variables in
ParameterBlock
and throughShaderVar
.- Throw exception when trying to bind a resource to a variable of a different type.
- Throw exception when trying to bind a resource to a SRV that is not created with the
ShaderResource
flag. - Throw exception when trying to bind a resource to a UAV that is not created with the
UnorderedAccess
flag. - Throw exception when trying to get a resource from a variable of a different type.
- Throw exception when trying to set a uniform variable with a different size/type.
- Reduce reference counting overhead for type information.
- Lifetime is tied to the
ParameterBlockReflection
object. TheTypedShaderVarOffset
has a non-owning pointer to the type. ShaderVar
does not own either the pointer toParameterBlock
(same as before) or the type information.
- Lifetime is tied to the
- Add
FALCOR_GFX_CALL
checks to GFX dispatch calls. - Use
std::string_view
for shader varia...
6.0
Overview
This release of Falcor provides the following significant improvements and new features:
- Initial work on making Falcor available as a Python module in an external Python environment.
- Introduce a plugin system for handling render passes and scene importers.
- Remove native D3D12 backend and switch to Slang/GFX exclusively for supporting both D3D12 and Vulkan.
- Remove legacy raster code that was not maintained and far from state-of-the-art.
- Replace
glm
with custom vector/matrix classes with more aligned sematics to Slang. - Introduce intrusive reference counted
Object
base class and replaceType::SharedPtr
withref<Type>
. - Improved Linux support.
- Introduce
clang-format
for automatic code formatting of both C/C++ and Slang source files.
Dependencies
- Update
slang
to2023.0.3
. - Update
nvapi
toR520
. - Update
dlss
to3.1.0
. - Update
ImGUI
to latestdocking
branch. - Update
dxcompiler
to1.7.2207
. - Update
Agility SDK
to1.606.3
. - Update
assimp
to5.2.5
. - Update
python
to3.10.11
. - Update
USD
to22.11
and switch tono-python
version. - Update
fmt
to10.0.0
. - Add
nlohmann::json
header-only library. - Add
pybind11_json
header-only library. - Switch from using
RapidJSON
tonlohmann::json
. - Stop including dependencies from
tiny-cuda-nn
globally into Falcor.
Project Structure
- Add new top-level
scripts
folder for render scripts. - Add new top-level
data
folder that contains all the data that was before spread within theSource
folder. - Write plugin libraries (dlls) to a separate
plugins
folder, de-cluttering the main output folder. - Reorganize
media
package:- Generally go to
snake_case
filenames. - Move everything into two folders:
test_scenes
andtest_images
. - Remove some obsolete files.
- Generally go to
Tooling
- Add
clang-format
for automatic code formatting. - Add
.clang-format-ignore
file to black-, and white-list paths. - Enable
clang-format
on all ofSource/Falcor/Core
,Source/Falcor/RenderGraph
,Source/Falcor/RenderPasses
,Source/Tools
, andSource/Samples
. - Add
tools/update_comment_style
script to automatically convert old to new comment style. - Improve
update_legal_headers.py
to abort ifgit
is unavailable and gracefully handle untracked files. - Extend
generate_stubs.py
with support for generating bindings for python submodules. - Add
pymacro
utility to expandPYMACRO
macros in C++ code. This utility is used inVectorMath.h
and the variousVectorSwizzleX.inl.h
files.
Coding Conventions
- Change the function comment coding convention for new code to utilize the existing tool support in Visual Studio and Visual Studio Code.
- Add coding rule that slang requires
1.f
float literals.
Project Templates
- Rename
PassLibraryTemplate
toRenderPassTemplate
. - Rename
ProjectTemplate
toSampleAppTemplate
. - Rename
make_new_render_pass_library
tomake_new_render_pass
. - Rename
make_new_sample
tomake_new_sample_app
. - Build templates by default to avoid bitrot.
Build System
- Build with VS2022/14.4 toolchain by default
- Remove
FALCOR_RENDER_BACKEND
cmake option. - Simplify build configurations because render backend configuration is gone now.
- Remove
d3d12
flag from VS setup scripts. - Fix missing includes.
- Extend header validation with option to ignore individual files.
- Add new cmake presets for building with additional settings for continuous integration.
- Use
FALCOR_SLANG_CONFIG
cmake cache option to switch between release and debug version of slang. - Debug version of slang is only available if you build slang yourself and point packman to it, e.g., via
dependencies.user.xml
. - Link
args
library directly in executables that use it. - Make internal dependencies of
Falcor
private, add dependencies to render passes where required. - Split
falcor_deps
into multiple finer grained targets. - Silence finding
git
during configure time. - Introduce
FALCOR_ENABLE_USD
to enable/disable compilation of components requiring USD. - Use
find_package
to find a python distribution. - Compile Falcor python bindings as a separate module and place it in the
python
directory in the output directory. - Setup python search path to locate the
falcor
module when starting the embedded python interpreter. - Move some targets to
Misc
folder in VS. - Embed git version info in Falcor library.
- Log version string on startup, (e.g.
Falcor 5.2 (commit: ab4852274, branch: git-version)
). - Copy
scripts
to binary output directory. - Use lower-case
shaders
folder in binary output directory. - Add
FALCOR_REPORT_EXCEPTION_AS_ERROR
cmake option to enable reporting exceptions as errors. - Generate
plugins.json
in output directory containing a list of all plugins. - Generate
setpath.xxx
scripts in output directory. - Generate python stub files for the
falcor
module. - Rename CMake preset
linux-ninja-clang
tolinux-clang
. - Add support for compiling with GCC (add
linux-gcc
CMake preset). - Compile with
_GLIBCXX_USE_CXX11_ABI=0
for compatibility with USD libraries. - Increase MSVC warnings to
/W4
and disable some specific warnings. - Generally enable "shadowing" warnings which avoids non-obvious bugs and paves the way to use text replacement for removing hungerian notation.
- Add
FALCOR_ENABLE_ASAN
cmake option to enable address sanitizer.
Remove Legacy Code
- Remove
VariablesBufferUI
. - Remove
CUDAProgram
. - Remove
EnvMapLighting
. - Remove
Perception
utils. - Remove
ModelViewer
sample. - Remove
RTXGI
module. - Remove
CSM
render pass. - Remove
FXAA
render passes. - Remove
SSAO
render pass. - Remove
SkyBox
render pass. - Remove
ForwardLightingPass
render pass. - Remove
DepthPass
render pass. - Remove
TemporalDelayPass
render pass.
Falcor Python Module
- Falcor no longer requires exact 3.7 Python version.
- Rename Falcor python extension module from
falcor
tofalcor_ext
and wrap it in afalcor
package that sets up the DLL search directory. - Fix Python naming conventions in the bindings of the following classes:
Texture
,Testbed
,RenderGraph
,AABB
,Rectangle
,Profiler
- Note: old bindings are still available but marked
PYTHONDEPRECATED
, with the exception ofProfiler
- Note: old bindings are still available but marked
- Cleanup
RenderGraph
bindings and write render graphs withRenderPass.create_pass
instead of free standingcreatePass
followed byaddPass
. - Remove obsolete bindings for
DeviceDesc
,SampleAppDesc
andWindowDesc
. - Add initial bindings for
Device
,Resource
,Texture
,Buffer
,CopyContext
,ComputeContext
,RenderContext
- Add initial python test that just instantiates a
Device
. - Add new
Testbed
application class for running Falcor from Python interpreter. - Automatically release Falcor python module handle using python's
atexit
infrastructure. - Allow
Testbed
to run in headless mode (enabled by default). - Add a mechanism to detect if
falcor
Python module is loaded from the embedded interpreter or not. - Attempt to load Agility SDK when using
falcor
from the Python interpreter. - Add pybind11 backport of nanobind
ndarray
class supporting both python buffer protocol anddlpack
for CPU/GPU tensor exchange.
Plugin System
- Introduces a new more generic plugin system, replacing the
RenderPassLibrary
and allowing for new plugin types. - Add
PluginManager
for loading/unloading plugins, querying plugin information and creating plugin instances. - Add
FALCOR_PLUGIN_BASE_CLASS
macro for extending a base class to be used as a plugin interface. - Add
FALCOR_PLUGIN_CLASS
macro for extending a class to be used as a plugin class. - Rename
getPasses
in render pass libraries toregisterPlugin
and use new register mechanism. - Minor adjustments in render pass libraries to make compatible with new plugin system.
- Rename cmake
add_renderpass
macro toadd_plugin
. - Always load all plugins at startup based on the
plugins/plugins.json
index file.
Cleanup Globals
- Tag globals to be removed using
// TODO: REMOVEGLOBAL
. - Remove global
gpDevice
device pointer. - Remove
Renderer
andFramework
interfaces. - Rename
Sample
toSampleApp
and refactor to not rely onRenderer
andFramework
interfaces. - Rename
SampleConfig
toSampleAppConfig
. - Remove global
gpFramework
pointer. - Remove
gMainWindowHandle
andsetMainWindowHandle
. - Convert
TextRenderer
from singleton to a normal class. - Cleanup
TextRenderer
andFont
and enableclang-format
. - Make
QueryHeap
andGpuMemoryHeap
having non-owning reference to device. - Remove global in
RenderContext
. - Remove global
createRenderGraph()
andloadRenderGraph()
in Falcor for Python. Usetestbed.createRenderGraph()
andtestbed.loadRenderGraph()
instead. - Remove global
createPass()
in Falcor for Python. UseRenderGraph.createPass()
instead. - Keep device in a
std::unique_ptr<Device>
inSampleApp
andTestbed
to better indicated ownership. - Add
SharedCache
utility class for managing shared global data. - Use
SharedCache
inFullScreenPass
. - Use
SharedCache
in to replace global SDF GPU data. - Make
Device
own theProfiler
. - Also use non-owning pointer to device in
CopyContext
/ComputeContext
/RenderContext
as the life-time of these are tied to the device. - Manage multiple
ImGui
contexts. - Add support managing a list of images in the GUI context to get rid of globals.
- Allow creating multiple
Testbed
instances. - Handle multiple GUI contexts.
- Add image caching in GUI system to remove global clock image textures.
Cleanup
- Prefer using
static constexpr
in class/struct scoped constants. - Rewrite
T const&
toconst T&
which is the prevalent convention in Falcor.
Intrusive reference ...
6.0-preview2
Overview
This release of Falcor provides the following significant improvements and new features:
- Initial work on making Falcor available as a Python module in an external Python environment.
- Introduce a plugin system for handling render passes and scene importers.
- Remove native D3D12 backend and switch to Slang/GFX exclusively for supporting both D3D12 and Vulkan.
- Remove legacy raster code that was not maintained and far from state-of-the-art.
- Replace
glm
with custom vector/matrix classes with more aligned sematics to Slang. - Introduce intrusive reference counted
Object
base class and replaceType::SharedPtr
withref<Type>
. - Improved Linux support.
- Introduce
clang-format
for automatic code formatting of both C/C++ and Slang source files.
Dependencies
- Update
slang
to version0.27.14
. - Update
nvapi
to versionR520
. - Update
dlss
to version3.1.0
. - Update
ImGUI
to latestdocking
branch. - Update
dxcompiler
to1.7.2207
. - Update
Agility SDK
to1.606.3
. - Update
assimp
to version5.2.5
. - Update
python
to3.10.11
. - Update
USD
to22.11
and switch tono-python
version. - Add
nlohmann::json
header-only library. - Add
pybind11_json
header-only library. - Switch from using
RapidJSON
tonlohmann::json
. - Stop including dependencies from
tiny-cuda-nn
globally into Falcor.
Project Structure
- Add new top-level
scripts
folder for render scripts. - Add new top-level
data
folder that contains all the data that was before spread within theSource
folder. - Write plugin libraries (dlls) to a separate
plugins
folder, de-cluttering the main output folder.
Tooling
- Add
clang-format
for automatic code formatting. - Add
.clang-format-ignore
file to black-, and white-list paths. - Enable
clang-format
on all ofSource/Falcor/Core
,Source/Falcor/RenderGraph
,Source/Falcor/RenderPasses
,Source/Tools
, andSource/Samples
. - Add
tools/update_comment_style
script to automatically convert old to new comment style. - Improve
update_legal_headers.py
to abort ifgit
is unavailable and gracefully handle untracked files. - Extend
generate_stubs.py
with support for generating bindings for python submodules. - Add
pymacro
utility to expandPYMACRO
macros in C++ code. This utility is used inVectorMath.h
and the variousVectorSwizzleX.inl.h
files.
Coding Conventions
- Change the function comment coding convention for new code to utilize the existing tool support in Visual Studio and Visual Studio Code.
- Add coding rule that slang requires
1.f
float literals.
Project Templates
- Rename
PassLibraryTemplate
toRenderPassTemplate
. - Rename
ProjectTemplate
toSampleAppTemplate
. - Rename
make_new_render_pass_library
tomake_new_render_pass
. - Rename
make_new_sample
tomake_new_sample_app
. - Build templates by default to avoid bitrot.
Build System
- Build with VS2022/14.4 toolchain by default
- Remove
FALCOR_RENDER_BACKEND
cmake option. - Simplify build configurations because render backend configuration is gone now.
- Remove
d3d12
flag from VS setup scripts. - Fix missing includes.
- Extend header validation with option to ignore individual files.
- Add new cmake presets for building with additional settings for continuous integration.
- Use
FALCOR_SLANG_CONFIG
cmake cache option to switch between release and debug version of slang. - Debug version of slang is only available if you build slang yourself and point packman to it, e.g., via
dependencies.user.xml
. - Link
args
library directly in executables that use it. - Make internal dependencies of
Falcor
private, add dependencies to render passes where required. - Split
falcor_deps
into multiple finer grained targets. - Silence finding
git
during configure time. - Introduce
FALCOR_ENABLE_USD
to enable/disable compilation of components requiring USD. - Use
find_package
to find a python distribution. - Compile Falcor python bindings as a separate module and place it in the
python
directory in the output directory. - Setup python search path to locate the
falcor
module when starting the embedded python interpreter. - Move some targets to
Misc
folder in VS. - Embed git version info in Falcor library.
- Log version string on startup, (e.g.
Falcor 5.2 (commit: ab4852274, branch: git-version)
). - Copy
scripts
to binary output directory. - Use lower-case
shaders
folder in binary output directory. - Add
FALCOR_REPORT_EXCEPTION_AS_ERROR
cmake option to enable reporting exceptions as errors. - Generate
plugins.json
in output directory containing a list of all plugins. - Generate
setpath.xxx
scripts in output directory. - Generate python stub files for the
falcor
module. - Rename CMake preset
linux-ninja-clang
tolinux-clang
. - Add support for compiling with GCC (add
linux-gcc
CMake preset). - Compile with
_GLIBCXX_USE_CXX11_ABI=0
for compatibility with USD libraries. - Increase MSVC warnings to
/W4
and disable some specific warnings. - Generally enable "shadowing" warnings which avoids non-obvious bugs and paves the way to use text replacement for removing hungerian notation.
Remove Legacy Code
- Remove
VariablesBufferUI
. - Remove
CUDAProgram
. - Remove
EnvMapLighting
. - Remove
Perception
utils. - Remove
ModelViewer
sample. - Remove
RTXGI
module. - Remove
CSM
render pass. - Remove
FXAA
render passes. - Remove
SSAO
render pass. - Remove
SkyBox
render pass. - Remove
ForwardLightingPass
render pass. - Remove
DepthPass
render pass. - Remove
TemporalDelayPass
render pass.
Falcor Python Module
- Falcor no longer requires exact 3.7 Python version.
- Rename Falcor python extension module from
falcor
tofalcor_ext
and wrap it in afalcor
package that sets up the DLL search directory. - Fix Python naming conventions in the bindings of the following classes:
Texture
,Testbed
,RenderGraph
,AABB
,Rectangle
,Profiler
- Note: old bindings are still available but marked
PYTHONDEPRECATED
, with the exception ofProfiler
- Note: old bindings are still available but marked
- Cleanup
RenderGraph
bindings and write render graphs withRenderPass.create_pass
instead of free standingcreatePass
followed byaddPass
. - Remove obsolete bindings for
DeviceDesc
,SampleAppDesc
andWindowDesc
. - Add initial bindings for
Device
,Resource
,Texture
,Buffer
,CopyContext
,ComputeContext
,RenderContext
- Add initial python test that just instantiates a
Device
. - Add new
Testbed
application class for running Falcor from Python interpreter. - Automatically release Falcor python module handle using python's
atexit
infrastructure. - Allow
Testbed
to run in headless mode (enabled by default). - Add a mechanism to detect if
falcor
Python module is loaded from the embedded interpreter or not. - Attempt to load Agility SDK when using
falcor
from the Python interpreter. - Add pybind11 backport of nanobind
ndarray
class supporting both python buffer protocol anddlpack
for CPU/GPU tensor exchange.
Plugin System
- Introduces a new more generic plugin system, replacing the
RenderPassLibrary
and allowing for new plugin types. - Add
PluginManager
for loading/unloading plugins, querying plugin information and creating plugin instances. - Add
FALCOR_PLUGIN_BASE_CLASS
macro for extending a base class to be used as a plugin interface. - Add
FALCOR_PLUGIN_CLASS
macro for extending a class to be used as a plugin class. - Rename
getPasses
in render pass libraries toregisterPlugin
and use new register mechanism. - Minor adjustments in render pass libraries to make compatible with new plugin system.
- Rename cmake
add_renderpass
macro toadd_plugin
. - Always load all plugins at startup based on the
plugins/plugins.json
index file.
Cleanup Globals
- Tag globals to be removed using
// TODO: REMOVEGLOBAL
. - Remove global
gpDevice
device pointer. - Remove
Renderer
andFramework
interfaces. - Rename
Sample
toSampleApp
and refactor to not rely onRenderer
andFramework
interfaces. - Rename
SampleConfig
toSampleAppConfig
. - Remove global
gpFramework
pointer. - Remove
gMainWindowHandle
andsetMainWindowHandle
. - Convert
TextRenderer
from singleton to a normal class. - Cleanup
TextRenderer
andFont
and enableclang-format
. - Make
QueryHeap
andGpuMemoryHeap
having non-owning reference to device. - Remove global in
RenderContext
. - Remove global
createRenderGraph()
andloadRenderGraph()
in Falcor for Python. Usetestbed.createRenderGraph()
andtestbed.loadRenderGraph()
instead. - Remove global
createPass()
in Falcor for Python. UseRenderGraph.createPass()
instead. - Keep device in a
std::unique_ptr<Device>
inSampleApp
andTestbed
to better indicated ownership. - Add
SharedCache
utility class for managing shared global data. - Use
SharedCache
inFullScreenPass
. - Use
SharedCache
in to replace global SDF GPU data. - Make
Device
own theProfiler
. - Also use non-owning pointer to device in
CopyContext
/ComputeContext
/RenderContext
as the life-time of these are tied to the device. - Manage multiple
ImGui
contexts. - Add support managing a list of images in the GUI context to get rid of globals.
- Allow creating multiple
Testbed
instances. - Handle multiple GUI contexts.
- Add image caching in GUI system to remove global clock image textures.
Cleanup
- Prefer using
static constexpr
in class/struct scoped constants. - Rewrite
T const&
toconst T&
which is the prevalent convention in Falcor.
Intrusive reference counting
- Add
Object
base class for reference counted objects. - Add
ref<T>
reference counting helper to reference objects derived fromObject
. - Add
BreakableReference
type, to allow a subset of API classes to break their strong referen...
6.0-preview
Overview
This release of Falcor provides the following significant improvements and new features:
- Initial work on making Falcor available as a Python module in an external Python environment.
- Introduce a plugin system for handling render passes and scene importers.
- Remove native D3D12 backend and switch to Slang/GFX exclusively for supporting both D3D12 and Vulkan.
- Remove legacy raster code that was not maintained and far from state-of-the-art.
- Introduce
clang-format
for automatic code formatting of both C/C++ and Slang source files.
Dependencies
- Update
slang
to version0.24.52
. - Update
nvapi
to versionR520
. - Update
dlss
to version3.1.0
. - Update
ImGUI
to latestdocking
branch. - Update
dxcompiler
to1.7.2207
. - Update
Agility SDK
to1.606.3
. - Add
nlohmann::json
header-only library. - Add
pybind11_json
header-only library. - Switch from using
RapidJSON
tonlohmann::json
. - Stop including dependencies from
tiny-cuda-nn
globally into Falcor.
Project Structure
- Add new top-level
scripts
folder for render scripts. - Add new top-level
data
folder that contains all the data that was before spread within theSource
folder. - Write plugin libraries (dlls) to a separate
plugins
folder, de-cluttering the main output folder.
Tooling
- Add
clang-format
for automatic code formatting. - Add
.clang-format-ignore
file to black-, and white-list paths. - Enable
clang-format
on all ofSource/Falcor/Core
,Source/Tools
, andSource/Samples
. - Add
tools/update_comment_style
script to automatically convert old to new comment style. - Improve
update_legal_headers.py
to abort ifgit
is unavailable and gracefully handle untracked files. - Extend
generate_stubs.py
with support for generating bindings for python submodules.
Coding Conventions
- Change the function comment coding convention for new code to utilize the existing tool support in Visual Studio and Visual Studio Code.
- Add coding rule that slang requires
1.f
float literals.
Project Templates
- Rename
PassLibraryTemplate
toRenderPassTemplate
. - Rename
ProjectTemplate
toSampleAppTemplate
. - Rename
make_new_render_pass_library
tomake_new_render_pass
. - Rename
make_new_sample
tomake_new_sample_app
. - Build templates by default to avoid bitrot.
Build System
- Remove
FALCOR_RENDER_BACKEND
cmake option. - Simplify build configurations because render backend configuration is gone now.
- Remove
d3d12
flag from VS setup scripts. - Fix missing includes.
- Extend header validation with option to ignore individual files.
- Add new cmake presets for building with additional settings for continuous integration.
- Use
FALCOR_SLANG_CONFIG
cmake cache option to switch between release and debug version of slang. - Debug version of slang is only available if you build slang yourself and point packman to it, e.g., via
dependencies.user.xml
. - Link
args
library directly in executables that use it. - Make internal dependencies of
Falcor
private, add dependencies to render passes where required. - Split
falcor_deps
into multiple finer grained targets. - Silence finding
git
during configure time. - Introduce
FALCOR_ENABLE_USD
to enable/disable compilation of components requiring USD. - Use
find_package
to find a python distribution. - Compile Falcor python bindings as a separate module and place it in the
python
directory in the output directory. - Setup python search path to locate the
falcor
module when starting the embedded python interpreter. - Move some targets to
Misc
folder in VS. - Embed git version info in Falcor library.
- Log version string on startup, (e.g.
Falcor 5.2 (commit: ab4852274, branch: git-version)
). - Copy
scripts
to binary output directory. - Use lower-case
shaders
folder in binary output directory. - Add
FALCOR_REPORT_EXCEPTION_AS_ERROR
cmake option to enable reporting exceptions as errors. - Generate
plugins.json
in output directory containing a list of all plugins. - Generate
setpath.xxx
scripts in output directory. - Generate python stub files for the
falcor
module.
Remove Legacy Code
- Remove
VariablesBufferUI
. - Remove
CUDAProgram
. - Remove
EnvMapLighting
. - Remove
Perception
utils. - Remove
ModelViewer
sample. - Remove
RTXGI
module. - Remove
CSM
render pass. - Remove
FXAA
render passes. - Remove
SSAO
render pass. - Remove
SkyBox
render pass. - Remove
ForwardLightingPass
render pass. - Remove
DepthPass
render pass. - Remove
TemporalDelayPass
render pass.
Falcor Python Module
- Add new
Testbed
application class for running Falcor from Python interpreter. - Automatically release Falcor python module handle using python's
atexit
infrastructure. - Allow
Testbed
to run in headless mode (enabled by default). - Add a mechanism to detect if
falcor
Python module is loaded from the embedded interpreter or not. - Attempt to load Agility SDK when using
falcor
from the Python interpreter.
Plugin System
- Introduces a new more generic plugin system, replacing the
RenderPassLibrary
and allowing for new plugin types. - Add
PluginManager
for loading/unloading plugins, querying plugin information and creating plugin instances. - Add
FALCOR_PLUGIN_BASE_CLASS
macro for extending a base class to be used as a plugin interface. - Add
FALCOR_PLUGIN_CLASS
macro for extending a class to be used as a plugin class. - Rename
getPasses
in render pass libraries toregisterPlugin
and use new register mechanism. - Minor adjustments in render pass libraries to make compatible with new plugin system.
- Rename cmake
add_renderpass
macro toadd_plugin
. - Always load all plugins at startup based on the
plugins/plugins.json
index file.
Cleanup Globals
- Tag globals to be removed using
// TODO: REMOVEGLOBAL
. - Remove global
gpDevice
device pointer. - Add
getGlobalDevice()
as a temporary way of still accessing the global pointer until the refactor is done. - Remove
Renderer
andFramework
interfaces. - Rename
Sample
toSampleApp
and refactor to not rely onRenderer
andFramework
interfaces. - Rename
SampleConfig
toSampleAppConfig
. - Remove global
gpFramework
pointer.
Graphics API
- Report GFX/D3D12 live objects on shutdown in debug builds (helps debugging clean shutdown).
- Cleanup resource format list to match what we have in
gfx
. - Add conversion to native Vulkan formats.
- Move utilities for conversion to native formats to
NativeFormats.h
(reduce d3d12/vulkan header exposure). - Add
NativeHandle
used for passing native graphics API handles. - Add support for querying both D3D12 and Vulkan native handles.
- Move D3D12 specific code into
Shared
directory (specificallyConstantBufferView
). - Remove most obsolete handle definitions in
D3D12Handles.h
. - Simplify
ResourceView
base class. - Work towards not exposing
d3d12.h
andvulkan.h
by default, only where it's actually used. - Enable shader cache by default.
- Add
Swapchain
class. - Remove implicit swapchain and framebuffer handling from
Device
. - Add mechanism for passing a shader prelude to the downstream compiler.
- Pass NVAPI search path to
dxc
. - Add
ShaderExecutionReorderingAPI
andRaytracingReordering
feature flag. - Add support for creating device on specific graphics adapter.
- Remove documentation of
FALCOR_GPU_VENDOR_ID
andFALCOR_GPU_DEVICE_ID
which are no longer supported. - Remove
FALCOR_D3D12
andFALCOR_GFX
macros. - Remove most handle types and replace with
gfx
types directly. - Use
gfx::BufferResource
andgfx::ImageResource
to reduce amount of casting. - Add device limits to remove D3D12 specific code.
- Remove global blit context.
- Merge all GFX sources in
Source/Falcor/Core/API/GFX
into the main source files inSource/Falcor/Core/API
. - Remove D3D12 backend sources in
Source/Falcor/Core/API/D3D12
. - Replace
[__unsafeForceInlineEarly]
with new[ForceInline]
. - Fix
GFXParameterBlock
to own resources that are assigned withsetBuffer
. - Fix
to_string
forShaderType
. - Check for
Device::SupportedFeatures::WaveOperations
inGFXDevice
. - Add additional
FALCOR_GFX_CALL
checks and improve logging of failures. - Replace static configuration of GFX device type with the option to set device type at runtime.
- Add runtime checks for D3D12 (
requireD3D12()
) to throw an exception not having D3D12 available. - Throw when trying to create invalid entry points on an
RtProgram
. - Pass
RenderContext
to profile calls. - Add
Device::enableAgilitySDK()
to load Agility SDK at runtime. - Add
getImage
andgetData
functions toTexture
Python API, allowing to get images as numpy arrays. - Fix depth clip flag in gfx rasterizer state.
- Disable slang conversion warnings.
Core
- Search paths in
Settings
are now always weakly cannonicalized. - Break into debugger if error message box is disabled.
- Add
setKeyboardInterruptHandler()
inOS.h
for setting up a callback for Ctrl-C. - Add
operator<
onfloatX
andintX
types. - Remove
postQuitMessage
function. - Fix return code handling in
SampleApp
. - Extend
SampleApp
to allow for running without creating a window/swapchain (headless mode). - Do not create FBOs for swapchain images but copy final output to swapchain image instead.
- Rename
SampleApp::onResourceSwapChain()
toSampleApp::onResize()
. - Add
Window::setWindowIcon()
function. - Disable show error message box by default.
- Introduce
settings.json
, JSON config file that allows specifying global options by placing it in~/.falcor/settings.json
.- Supports
["standardsearchpath"]
and["searchpath"]
. - Within these, supports
category = "path1;path2;&;@"
or ``category = ["path1", "path2", "&", "@"]` - The
&
gets replaced b...
- Supports
5.2
Overview
This release of Falcor provides the following significant improvements and new features:
- Switch to the
CMake
build system. - Cleanup project folder structure.
- Major cleanup to make include files self-sufficient.
- Replace use of
glm
matrices with new matrices inrmcv
(row-major column-vector) namespace to match layout on the shader side. - Experimental support for running on Linux.
Build System
- Remove native Visual Studio solution/project files.
- Add CMake build scripts.
- Add
setup.bat
,setup_vs2019.bat
andsetup_vs2022.bat
convenience scripts to fetch dependencies and setup VS solutions. - Cleanup a lot of
#ifdef FALCOR_ENABLE_XXX
code in files that are now only compiled if the library is available. - Rename
FALCOR_ENABLE_XXX
toFALCOR_USE_XXX
to be consistent with CMake variables. - Initial support for compiling/running on Linux.
- Add
FALCOR_HAS_D3D12
andFALCOR_HAS_VULKAN
feature flags in CMake and pass them as compile definitions. - Replace
FALCOR_D3D12_AVAILABLE
withFALCOR_HAS_D3D12
. - Remove obsolete guards around
FALCOR_EXPORT_D3D12_AGILITY_SDK
. - Replace
#pragma comment(lib, xxx)
directives with explicit linking from CMake. - Use CMake to detect if certain libraries are available instead of relying on
#define
s inFalcorConfig.h
. - Conditionally compile
NRDPass
,DLSSPass
andOptixDenoiser
. - Conditionally compile
RTXGIPass
,NRDPass
,NGXDenoiser
,DLDenoiserPass
andDeepLearningPass
when D3D12 is available. - Link
hdf5
debug library in debug config. - Add
ninja_log_analyzer.py
script to parse ninja build log files and show total build time as well as most expensive targets. - Add
FALCOR_PRECOMPILED_HEADERS
cache variable to enable/disable precompiled headers. - Fix build if precompiled headers are disabled.
- Replace
#pragma
inline manifest with externalFalcor.manifest
file. - Make all samples console applications.
- Enable
/W2
warning level and/WX
(warnings as errors).
VS Code
- Add
.vscode-default
folder containing sensible default configuration for VS Code. - Copy
.vscode-default
to.vscode
insetup.bat
/setup.sh
if it doesn't exist. This sets up the VS Code workspace on initial setup. - Add recommended VS Code extensions (C++, CMake Tools + language support, editorconfig, Slang language support).
Dependencies
- Update CUDA to version 11.6.2.
- Update Slang to version 0.24.11
- Update
falcor_dependencies
. - Update
nanovdb
to a recent version. - Add
cmake
andninja
to tools.
Project Structure
- Rename
Tools
directory totools
. - Move
Build/packman
totools/packman
. - Rename
Build
tobuild_scripts
. - Rename
Media
tomedia
. - Rename
Tests
totests
. - Rename
Docs
todocs
and move to lower-case file names. - Consolidate packman dependencies to one global
dependencies.xml
in the root. - Move tools to create sample and render pass library to
tools
directory. - Remove obsolete scripts.
- Cleanup arguments passed to deployment scripts.
- Establish
external
as the new location for third party libraries.- Add git submodules for the following libraries:
glfw
,glm
,imgui
,pybind11
,fmt
,args
. - Add
mikktspace
as local files. - Remove the same libraries from prebuilt
falcor_dependencies
, which now only contains the big libraries expensive to build. - Add automatic initialization of git submodules in
setup.bat
as well as during configure time (only if not present). - Move header-only libraries to
external/include
.
- Add git submodules for the following libraries:
- Cleanup
.editorconfig
, remove hard setting line endings to CRLF (use native line ending instead). - Add
.gitattributes
file with* text=auto
. - Renormalize existing files in repository to use LF instead of CRLF (only 3 files affected).
Cleanup
- Remove
stdafx
precompiled headers. - Remove
#include <Falcor.h>
in all headers in the main Falcor library. - Remove includes in
Falcor.h
, onlyCore/
andScene/
includes remain. - Factor out global macros in
Framework.h
into separateMacros.h
file. - Factor out global assert macros in
Framework.h
into separateAssert.h
file. - Move definitions of
FALCOR_HAS_D3D12_AGILITY_SDK
andFALCOR_NVAPI_AVAILABLE
intoMacros.h
- Remove
has_vtable
and usestd::is_polymorphic
instead. - Don't use deprecated
std::iterator
(avoids compiler warnings). - Move implementation of
Buffer::adjustSizeOffsetParams
to cpp file. - Move
uint
typedef fromHostDeviceShared.slangh
toVector.h
to make it available on host in the context of using other vector types likeuint2
,uint3
anduint4
. - Remove use of raw pointers for object ownership.
- Remove
arraysize()
helper and usestd::size()
instead. - Move
clamp
,lerp
,isPowerOf2
,div_round_up
andalign_to
fromFramework.h
toUtils/Math/Common.h
. - Move
HotReloadFlags
to newHotReloadFlags.h
. - Move
FboAttachementType
toRenderContext.h
. - Move
ShaderType
toShader.h
. - Move
ComparisonFunc
toAPI/Common.h
. - Move
fmt
formatters toUtils/StringFormatters.h
. - Add
Platform/PlatformHandles.h
. - Add
Utils/Math/Matrix.h
. - Fix includes for rest of the
Falcor
library, all header files are now self-sufficient. - Fix includes in
FalcorInternal
library, all header files are now self-sufficient. - Get rid of including
Framework.h
in any of the include files inFalcor
andFalcorInternal
. - Add header validation targets for
Falcor
andFalcorInternal
to allow compiling every header as a separate translation unit to ensure it is self-sufficient. Enabled using cache variableFALCOR_VALIDATE_HEADERS
. - Define graphics API handles in
Core/API/D3D12/D3D12Handles.h
andCore/API/GFX/GFXHandles.h
(common include isCore/API/Handles.h
). - Define graphics API helpers in
Core/API/D3D12/D3D12API.h
andCore/API/GFX/GFXAPI.h
(common include isCore/API/API.h
). - Remove
FalcorD3D12.h
andFalcorGFX.h
. - Move
RayFlags
andgetRaytracingMaxAttributeSize
toRaytracing.h
. - Remove
Framework.h
, moving exported includes toFalcor.h
. - Cleanup
#include ""
vs.#include <>
use. - Update coding conventions section on include files.
- Fix
this == nullptr
undefined behavior. - Add
RenderData::getTexture()
to directly get a texture and replaced allrenderData["texture"]->asTexture()
withrenderData.getTexture("texture")
. - Fix
static_assert
s inconstexpr
context. - Move static class template specialization out of class body.
- Add missing virtual destructor to
BaseConverter
. - Implement SHA1 to remove dependency to openssl/libcrypto.
- Provide
DXGI_FORMAT
ifdxgiformat.h
header is not available.
Linux Support
- Replace
.dll
with.so
when loading a render pass. - Implement
MonitorInfo
on Linux using GLFW.
C++20 preparation
- Move
span/span.h
tofstd/span.h
and replacetcp::span
withfstd::span
. - Introduce
fstd/bit.h
as a replacement for<bit>
. - Replace
getNextPowerOf2
withstd::bit_ceil
andgetLowerPowerOf2
withstd::bit_floor
. - Fix usage of
libfmt
API. - Fix format strings (found while enabling compile time format string checks testing C++20).
Core
- Updates due to changes in
pnanovdb
API. - Add
FALCOR_ENABLE_RENDER_PASS_HOT_RELOAD
define (defaults to0
) to disable. - Do not copy render pass DLLs to temporary files when hot reloading is disabled.
- Fix misleading parameter names in the TLAS build.
- Add interfaces for specifying Slang source handling.
- Add unit tests for string based Slang shader creation.
- Add means to force all shaders to have some compiler flags on and off.
- Detect target platform and set
FALCOR_PLATFORM
. - Convenience macros for checking platform:
FALCOR_WINDOWS
andFALCOR_LINUX
- Detect compiler and set
FALCOR_COMPILER
- Convenience macros for checking compiler:
FALCOR_MSVC
,FALCOR_CLANG
andFALCOR_GCC
. - Make use of platform/compiler defines.
- Add unit tests for
StructuredBuffer
matrix types. - Add unit test for
ByteAddressBuffer
templated loads. - Add
Program::ShaderModule
helper to represent a Slang module stored as a string or file. - Add
Program::Desc
interfaces for adding a shader module or list of modules. - Remove unnecessary
ShaderLibrary
class. - Fix shader reflection of fp16 matrix types.
- Add support to get current peak resident set size to control memory used.
Clock
can now loop the frame time, to replay animation.- Add optional
CameraController
bounding box clamp. - Improve error handling of type conformances in program creation.
Misc
- The lerp function can now lerp non-float types (e.g., matrices or vectors).
- Henyey-Greenstein anisotropy bugfix.
- Optimize
RayCones::computeLOD()
. - Remove
computeLOD()
that used texture dimensions as input. This function is not used. - Add support for general Options (nested dictionaries, can look up in the Renderman-compatible way of "dict0:dict1"). The current options are limited to controlling the
usdImporter
- Add support for general Attributes. For example
usdImporter:enableMotion
is true by default. Can be overriden by also settingusdImporter:enableMotion.filter
, which can be either a regex of shape names to which to apply the attribute. Or a list of 1 or 2 items, where first is the regex and the second is True when the Attribute should be applied to all shapes whose name does NOT match the regex. There can be only one such Attribute, which is a limitation that will be lifted in the future. - Add Attribute controls for curve tessellation (curves:mode, subdivPerSegment, keepOneEveryXStrands, keepOneEveryXVerticesPerStrand)
- Add an Attribute to convert disk light into a mesh.
- Add Options to control the default behavior of Mogwai controls (hidden or showing).
Matrix Libray
- Replace GLM (col major) with
rmcv
(row-majo...
5.1
Overview
This release of Falcor provides the following significant improvements and new features:
- Improved NRD denoiser, especially for denoising path traced signals.
- Improved sampling of specular surfaces when using RTXDI.
- A new scene importer for
pbrt-v4
scenes. This allows to load most of the scenes from the rendering resources page (https://benedikt-bitterli.me/resources). - Fully functional rendering backend based on Slang GFX supporting D3D12 and Vulkan (still experimental).
- Shipping with the following RTX SDKs out of the box: DLSS, RTXGI, RTXDI, NRD (note that they not covered by the same license as Falcor).
Dependencies
- Update
packman
to version 6.42. - Automatically fetch RTX SDKs (DLSS, RTXGI, RTXDI, NRD) instead of requiring manual installation.
- Update
falcor_dependencies
package (recent versions of OSS libraries). - Add
pugixml
library tofalcor_depedencies
. - Remove
DirectXTex
library fromfalcor_depenencies
. - Add
fstd::span
, an implementation of C++20std::span
. - Link
zlib
intoFalcor.dll
. - Update Slang to version 0.23.7.
- Update usage of FFMPEG API (
av_init_packet
is deprecated).
Core
- Use
std::filesystem::path
instead ofstd::string
for referring to file paths. - Add support for logging
std::filesystem::path
objects usingfmt::format
. - Rename
filename
argument topath
in many places. - Rename
ShaderLibrary::getFilename()
toShaderLibrary::getPath()
. - Rename
EnvMap::getFilename()
toEnvMap::getPath()
. - Rename
Scene::getFilename()
toScene::getPath()
. - Remove
doesFileExist
,isDirectoryExists
,createDirectory
,canonicalizeFilename
,getDirectoryFromFile
,getExtensionFromFile
,getFilenameFromPath
,swapFileExtension
,enumerateFiles
- Rename
getTempFilename
togetTempFilePath
. - Rename
DllHandle
toSharedLibraryHandle
. - Rename
loadDll
toloadSharedLibrary
. - Rename
releaseDll
toreleaseSharedLibrary
. - Rename
getDllProcAddress
togetProcAddress
. - Replace calls to
std::remove
withstd::filesystem::remove
. - Expose
std::filesystem::path
for file path options in render passes. This allows to usepathlib.Path
on the Python side. - Add
decompressFile
function. - Add support for loading
.gz
files inTriangleMesh::createFromFile()
. - Add
TriangleMesh::applyTransform()
taking a raw matrix. - Take
std::string_view
format strings on exception constructors. - Cast
enum class
values to integers when passing tofmt::format
(new versions don't support implicit conversion). - Fix handling creation of
RasterPass
andRasterScenePass
with empty vertex shader entry point. - Add
IDScope
helper class to create ImGui ID scopes (usingImGui::PushID/PopID
). - Add ID scopes to render graph UI to allow for multiple instances of the same render pass.
- Add a global input state class that can be used to check the states of keys and mouse buttons.
- Add functions for checking if keys, modifier keys (Ctrl, Alt, and Shift), and mouse buttons are held down, just pressed, and just released.
- Move the
Key
enum class to a new namespace calledInput
. - Add enums for modifiers and mouse buttons inside the
Input
namespace. - Change the types of the MouseEvent to be
ButtonDown
andButtonUp
instead of types specific for the three buttons left, middle and right. - Replace
InputModifer
withModifierFlags
in theMouseEvent
andKeyboardEvent
structs. - Make the
InputState
class accessible from thegpFramework
pointer in theSample
class. - Add gamepad support.
- Add
GamepadButton
,GamepadEvent
andGamepadState
to represent gamepad events and state. - Extend
IRenderer
withonGamepadEvent
andonGamepadState
members.
- Add
- Add gamepad support to
CameraController
. - Add
hasExtension()
to check for file extensions using case-insensitive comparison. - Rename
getExtensionFromFile()
togetExtensionFromPath()
and return lower-case strings. - Add
FALCOR_ASSERT_MSG
macro for asserts with messages. - Add additional assert macros (
FALCOR_ASSERT_EQ
,FALCOR_ASSERT_NE
etc.) to print values when a comparison assert fails. - Add
FALCOR_PRINT
convenience macro for printing variable name + value. - Add workarounds for missing profiler GPU timing synchronization.
- Skip first frame to not include zero timings in captured profiling data.
API
- Fix binding both UAV and SRV of the same resource.
- Add a
FALCOR_D3D12_AVAILABLE
macro that is defined to be 1 for both D3D12 and GFX backend. - Move
D3D12DescriptorSet
,D3D12DescriptorPool
,D3D12DescriptorHeap
,D3D12RootSignature
to be conditional behindFALCOR_D3D12_AVAILABLE
instead ofFALCOR_D3D12
, so these classes are usable when using GFX. - Add
getD3D12Handle
in addition to the existinggetApiHandle
method to several classes so that D3D12 specific user code can use them to get d3d12 handles regardless of whether GFX or D3D12 backend is in use. - Get rid of the use of
ParameterBlock::getUnderlyingConstantBuffer
by using a mockedID3D12Resource
implementation that allows obtaining the updated constant buffer data from RTXGI SDK without reading back from GPU memory, so we can use the normalParameterBlock::setBlob
to update the parameter block. - Enables NRD pass, RTXGIVolume, RTXGI, DeepLearningPass, DLDenoiser pass to be used in GFX.
- Move
RtProgramVars::init
fromD3D12ProgramVars.cpp
toProgramVars.cpp
- Move
getUniqueRtEntryPointGroupKernels
fromD3D12ProgramVars.cpp
toProgramVars.cpp
- Move all contents in
ShaderTable.cpp
toD3DShaderTable.cpp
making it D3D12 only. GFX'sIShaderTable
abstraction can be directly used byRtProgramVars
to implement its functionality. - Add device caps check for wave operations support.
- Extend
Program
to allow setting type conformances per entry point hit group. - Add optional entry point name suffix per entry point in
RtProgram::Desc
. - Add validation that all entry points names are unique.
- Cleanup of
Program
construction and registration for hot reload.
Shaders
- Remove implicit setting of
defaultVS
vertex shader entry point. - Consistently using
vsMain
andpsMain
as entry point names. - Consistently using
.3d.slang
extension for shaders containing both VS and PS entry points.
Scene
- Redesign animation of curves tessellated into poly-tubes: keep keyframe data of curves in LSS form and only tessellate the first frame of animation into a mesh that is then animated and rendered.
- Fix mismatch of pack and unpack SVO hit data.
- Add mesh vertex animation support.
- Fix ambiguous usage of Dynamic in Scene data structures when referring to meshes.
- Add accessors to
Scene
andMaterialSystem
to query geometries and type conformances by material type. - Add image test for ray tracing program with
createDynamicDispatch
and hit groups specialized by type conformances.
- Add option to toggle camera controls.
Materials
IBSDF::eval()
now expects a sampler for probabilistic BSDF evaluations.
Spectra
- Add
PiecewiseLinearSpectrum
,DenseleySampledSpectrum
andBlackbodySpectrum
classes. - Add
spectrumToXYZ
andspectrumToRGB
functions to convert any of these spectra to XYZ and RGB (needs to be expanded to support more color spaces in the future). - Add a library of useful named spectra that PBRT uses (illuminants, ior, sensor responses etc.).
- Add
SampledSpectrum<T>
utility class for uniformly sampled spectral data. - Add CIE 1931 XYZ curves and D65 illuminant as
SampledSpectrum
. - Add
wavelengthToD65()
andwavelengthToRGB()
utility functions. - Add a
SpectrumUI<T>
class for drawing a spectrum UI. Uses ImGui basics +Gui::Widgets
.
Render Passes
ModulateIllumination
pass now can composite various delta buffers.- Add work-in-progress SDF editor render pass.
PathTracer
- Add generation of delta guide buffers to
PathTracer
. - Cleanup output buffer table.
- Update
PathTracer
pass to specialize hit groups by material type. - Fix program specialization in
PathTracer
to fix scene reload bug. - Add image test for scene reload case.
NRD
- Update the code to work with the latest version of the
NRD
SDK. - Add delta motion vectors optimization pass.
- Update shader search path (we don't need to include
Externals/.packman
directly anymore). - Expose
ReBLUR
andReLAX Diffuse-only
denoisers andSpecularReflectionMvec
pass fromNRD
inNRDPass
. - Add
Enabled
toggle to all passes exposed inNRDPass
. - Add a toggle to switch between
ReLAX
andReBLUR
in runtime.
RTXGI
- Add
RTXGIVolume
, an interface to the RTXGI SDK. - Add
RTXGIPass
, a standalone render pass using RTXGI.
PBRT Importer
- Add a scene importer for
.pbrt
scene files (pbrt-v4). - Only supports a subset of the full pbrt-v4 scene definition, see
Source/Falcor/Scene/Importers/PBRTImporter/README.md
for more details. - Materials are converted to the Falcor
StandardMaterial
undergoing many approximations. - Texture support is very limited (only constant and bitmap textures for now).
- There is no support for curve geometry.
- There is very limited support for light sources, only diffuse area lights, distant lights and infinite (constant, envmap) is supported.
USD Importer
- Don't set camera speed if USD stage dimensions are bogus.
- Fix issue with USD importer computing the wrong number of expected normals.
5.0
Overview
This release of Falcor introduces a significant number of changes, including new features, improvements to existing functionality, and code reorganization. Some of the more notable changes include:
- The addition of a new USD scene importer.
- The material system has been rewritten to allow handling of different material types, and to accommodate future extensions.
- A new reference
PathTracer
render pass has been added, in favor of the now-deprecatedMegakernelPathTracer
. - The
RTXDI
SDK for computing direct illumination on many lights has been integrated. It is available in a standloneRTXDIPass
render pass and as a sampler for direct illumination inPathTracer
. - Render passes for
NRD
(denoising) andDLSS
(antialiasing/upscaling) have been added. - A new API backend
GFX
based on Slang is currently under development to allow future support for Vulkan, some additions for which are reflected in this release.
Dependencies
- Update dxc to version 1.6.2106
- Add support for D3D12 Agility SDK.
- Update Slang to 0.20.0.
- Add
libfmt
formatting library (will be replaced with<format>
when switching to C++20).
Build system
- Remove
DebugVK
andReleaseVK
build configurations. - Add
DebugGFX
andReleaseGFX
build configurations (GFX backend is not functional yet). - Add
msbuild.py
, which builds Falcor usingmsbuild.exe
, rather thandevenv.exe
, asvsbuild.bat
does. - Pull compiler tools and windows SDK components from packman.
- Add agent-specific
build_falcor.py
that usesmsbuild
.
Documentation
- Fix CUDA installation and usage instructions.
- Fix Optix installation instructions.
- Add development documentation:
- Coding conventions
- Error handling & logging
- Unit testing
- Add known issues.
- Add documentation for the material system in
Docs/Usage/Materials.md
. - Fix outdated scene docs.
Error handling
- Add
Exception
implementingstd::exception
. - Add
RuntimeError
,ArgumentError
andImportError
exception classes. - Add exception constructors taking format strings for convenience.
- Add
checkInvariant
andcheckArgument
helpers. - Update code base to use Falcor exception classes throughout.
Core
- Add
float16_t
type for binary16 numbers on the host with python bindings. - Add
float16_t2
,float16_t3
, andfloat16_t4
host side types. - Add convenience functions on
float16
vector types. - Separate logging from error reporting:
log*
functions only take a string and log it to the selected outputs.- Use
std::string_view
for passing log strings. - Add overloads for logging with format strings.
- Convert existing logging calls to use format strings.
- Remove
Logger::logToConsole
,Logger::shouldLogToConsole
,Logger::showBoxOnError
,isBoxShownOnError
. - Add
Logger::getVerbosity
. - Add
Logger::setOutputs
andLogger::getOutputs
to select the outputs to log to (Logger::OutputFlags
). - Add global
reportError
,reportErrorAndAllowRetry
andreportFatalError
functions to report errors to the user by logging and showing a message box. - Add global
setShowMessageBoxOnError
andgetShowMessageBoxOnError
to enable/disable showing message boxes.
- Fix bug in
GUI::addDropdown
when using an empty list. - Fix bug with UI buffer allocation when there are no UI elements.
- Fix validation error in
ComputeParallelReduction
.
API
- Remove Vulkan backend.
- Cleanup code around
FALCOR_VK
. - Rename
FALCOR_VK
toFALCOR_FLIP_Y
in places where NDC handedness matters (undefined for now). - Remove support for 5.x shading model.
- Add support for querying shader model support on
Device
.- Use
Device::getSupportedShaderModel
to get highest supported shader model. - Use
Device::isShaderModelSupported
to check if a shader model is supported.
- Use
- Enable debug layer check that was previously broken (do not hide debug message about overlapping descriptor ranges anymore).
- Add to
Program
the ability to specify which type implementations to an interface should be included in aProgramVersion
. - Add
getCompilerArguments
andsetCompilerArguments
toProgram::Desc
, allowing to set custom compiler arguments. - Better align API of
RtProgram::Desc
withProgram::Desc
(remove shader defines). - Fix clearing
uint
render outputs. - Add
RayFlags
enum and improve test to make sure flags match up with shader side. - Add
getRaytracingMaxAttributeSize()
. - Add
Core/API/Raytracing.h
withRtPipelineFlags
enum andRtAABB
struct. - Move
RtProgram
toCore/Program/RtProgram
. - Move
RtProgramVars
toCore/Program/ProgramVars
. - Move
RtBindingTable
toCore/Program/RtBindingTable
. - Move
RtStateObject
toCore/API/RtStateObject
and moved D3D12 implementation toD3D12RtStateObject
. - Move
ShaderTable
toCore/API/ShaderTable
and moved D3D12 details toD3D12ShaderTable
. - Remove support for local root signatures in shader binding table.
- Add
ParameterBlock::setAccelerationStructure(const BindLocation& loc, RtAccelerationStructure::SharedPtr)
. - Add
ShaderVars::setAccelerationStructure(RtAccelerationStructure::SharedPtr)
. - Make D3D12 implementation of
RtAccelerationStructure
hold a ShaderResourceView that is created on-demand. - Rename
DescriptorSet
toD3D12DescriptorSet
. - Rename
DescriptorPool
toD3D12DescriptorPool
. - Move
DescriptorPool::Type
intoShaderResourceType.cpp:ShaderResourceType
. - Move contents of
DescriptorSet.cpp
intoD3D12DescriptorSet.cpp
- Move contents of
DescriptorPool.cpp
intoD3D12DescriptorPool.cpp
- Move
DescriptorSet.h
intoCore/API/D3D12/D3D12DescriptorSet.h
- Move
DescriptorPool.h
intoCore/API/D3D12/D3D12DescriptorPool.h
- Move
Core/BufferTypes/ParameterBlock.h
->Core/API/ParameterBlock.h
- Move
Core/BufferTypes/ParameterBlock.cpp
->Core/API/D3D12/D3D12ParameterBlock.cpp
- Move
Core/Program/ProgramVars.h
->Core/API/ProgramVars.h
- Move
Core/Program/ProgramVars.cpp
->Core/API/D3D12/D3D12ProgramVars.cpp
. - Move
RenderContext::applyGraphicsVars
andComputeContext::applyComputeVars
to D3D12 only. - Move
ProgramVars::apply
to D3D12 only. - Make
ComputeContext::prepareForDispatch
D3D12 only. Program::preprocessAndCreateProgramKernels
now only generates shader binary code for D3D12 backend. For GFX, only the aIComponentType
is needed to create agfx::IShaderProgram
.- Move Blit render pass set up logic into shared
BlitContext.h
andBlitContext.cpp
files. - Move
blit
implementation from D3D12RenderContext.cpp to RenderContext.cpp so it may be shared between D3D12 and GFX. - Move some functions from
D3D12ParameterBlock.cpp
intoParameterBlock.cpp
so they can be shared between D3D12 and GFX. - Return shared pointer from
ResourceView::getResource()
. - Wrap all uses of
DescriptorSet
in application code toFALCOR_D3D12
. - Wrap all protected member declaration in
ParameterBlock
toFALCOR_D3D12
, because they are now D3D12 specific. - Move implementation of
ParameterBlock::createConstantBuffers
fromD3D12ParameterBlock.cpp
toParameterBlock.cpp
. - Fix assignment of bools to shader variables.
- Add error check to buffer creation that size > 0.
- Add validation check to detect buffers bound as SRV and UAV simultaneously.
- Fix bug in UAV clear caused by not using both CPU and GPU descriptors.
- Add error check that descriptor heap is shader visible when querying GPU handles.
Blit
- Add support for blitting between float and integer formats.
- Add error checks to
RenderContext::blit()
for unsupported combinations. - Remove unused
Blit.slang
file. - Optimize
RenderContext::blit()
to do a resource copy when possible. - Update
RenderContext::blit()
API to usekMaxRect
to specify the full rectangle (instead of -1). - Fix shader compiler warnings when initializing the blit shader.
ImageIO
- Use
nvtt
for saving DDS textures. - Add native support for DDS image loading, rather than relying on an external library.
ImageIO::loadDDS
now has original code instead of directly using the DDS loader provided by DirectXTex.- Old DirectXTex implementations have been removed.
- Compressed images can now be directly saved again.
Utilities
- Fix
removeLeadingWhitespace
,removeTrailingWhitespace
andremoveLeadingTrailingWhitespace
. - Extend
PrefixSum
to support more than 2N^2 elements, where N is the group size. - Fix
PixelDebug
when used for multiple shader dispatches within a single frame by not clearing the string hash table. - Add utilities for packing/unpacking unorm8 to
FormatConversion.slang
. - Add
ImageProcessing
utility class. - Add interval arithmetic functions in
Utils/Math/IntervalArithmetic.slang
. - Remove non-portable
StringUtils::getClassTypeName()
andStringUtils::getEnumTypeName()
.
Importer
- Use
ImporterError
exception for reporting errors during scene import. - Add new
USDImporter
scene importer.
Scene
- Cleanup handling of scene defines and type conformances.
- Add
Scene::UpdateFlags::SDFGridConfigChanged
. - Use the new acceleration structure abstraction in
Scene.cpp
for BLAS/TLAS creation. The existing raw D3D12 API calls have been replaced. - Change
Scene.cpp
to callsetAccelerationStructure
instead ofsetSrv
to bind TLAS. - Remove
pSrv
fromTlasData
. - Reorganizing BLAS/TLAS for curves: splitting the single BLAS/TLAS for procedural primitives into two (one for curves and the other for custom primitives).
- Handling transformations of cached curves using the scene graph and nodes.
- Improve error checks in
SceneBuilder
. - Provide analytic light sampling functions that take random numbers directly instead of a
ISampleGenerator
. - Extend
EnvMap
with additional methods to access the underlying map and helpers for...
5.0-preview
Overview
This release of Falcor introduces a significant number of changes, including new features, improvements to existing functionality, and code reorganization. Some of the more notable changes include:
- The addition of a new USD scene importer.
- The material system has been rewritten to allow handling of different material types, and to accommodate future extensions.
- A new reference
PathTracer
render pass has been added, in favor of the now-deprecatedMegakernelPathTracer
. - A new API backend
GFX
based on Slang is currently under development to allow future support for Vulkan, some additions for which are reflected in this release.
Dependencies
- Update dxc to version 1.6.2106
- Add support for D3D12 Agility SDK.
- Update Slang to 0.19.24.
- Add
libfmt
formatting library (will be replaced with<format>
when switching to C++20).
Build system
- Remove
DebugVK
andReleaseVK
build configurations. - Add
DebugGFX
andReleaseGFX
build configurations (GFX backend is not functional yet). - Add
msbuild.py
, which builds Falcor usingmsbuild.exe
, rather thandevenv.exe
, asvsbuild.bat
does. - Pull compiler tools and windows SDK components from packman.
- Add agent-specific
build_falcor.py
that usesmsbuild
.
Documentation
- Fix CUDA installation and usage instructions.
- Fix Optix installation instructions.
- Add development documentation:
- Coding conventions
- Error handling & logging
- Unit testing
- Add known issues.
Error handling
- Add
Exception
implementingstd::exception
. - Add
RuntimeError
,ArgumentError
andImportError
exception classes. - Add exception constructors taking format strings for convenience.
- Add
checkInvariant
andcheckArgument
helpers. - Update code base to use Falcor exception classes throughout.
Core
- Add
float16_t
type for binary16 numbers on the host with python bindings. - Add
float16_t2
,float16_t3
, andfloat16_t4
host side types. - Add convenience functions on
float16
vector types. - Separate logging from error reporting:
log*
functions only take a string and log it to the selected outputs.- Remove
Logger::logToConsole
,Logger::shouldLogToConsole
,Logger::showBoxOnError
,isBoxShownOnError
. - Add
Logger::getVerbosity
. - Add
Logger::setOutputs
andLogger::getOutputs
to select the outputs to log to (Logger::OutputFlags
). - Add global
reportError
,reportErrorAndAllowRetry
andreportFatalError
functions to report errors to the user by logging and showing a message box. - Add global
setShowMessageBoxOnError
andgetShowMessageBoxOnError
to enable/disable showing message boxes.
- Fix bug in
GUI::addDropdown
when using an empty list.
API
- Remove Vulkan backend.
- Cleanup code around
FALCOR_VK
. - Rename
FALCOR_VK
toFALCOR_FLIP_Y
in places where NDC handedness matters (undefined for now). - Remove support for 5.x shading model.
- Add support for querying shader model support on
Device
.- Use
Device::getSupportedShaderModel
to get highest supported shader model. - Use
Device::isShaderModelSupported
to check if a shader model is supported.
- Use
- Enable debug layer check that was previously broken (do not hide debug message about overlapping descriptor ranges anymore).
- Add to
Program
the ability to specify which type implementations to an interface should be included in aProgramVersion
. - Add
getCompilerArguments
andsetCompilerArguments
toProgram::Desc
, allowing to set custom compiler arguments. - Better align API of
RtProgram::Desc
withProgram::Desc
(remove shader defines). - Fix clearing
uint
render outputs. - Add
RayFlags
enum and improve test to make sure flags match up with shader side. - Add
getRaytracingMaxAttributeSize()
. - Add
Core/API/Raytracing.h
withRtPipelineFlags
enum andRtAABB
struct. - Move
RtProgram
toCore/Program/RtProgram
. - Move
RtProgramVars
toCore/Program/ProgramVars
. - Move
RtBindingTable
toCore/Program/RtBindingTable
. - Move
RtStateObject
toCore/API/RtStateObject
and moved D3D12 implementation toD3D12RtStateObject
. - Move
ShaderTable
toCore/API/ShaderTable
and moved D3D12 details toD3D12ShaderTable
. - Remove support for local root signatures in shader binding table.
- Add
ParameterBlock::setAccelerationStructure(const BindLocation& loc, RtAccelerationStructure::SharedPtr)
. - Add
ShaderVars::setAccelerationStructure(RtAccelerationStructure::SharedPtr)
. - Make D3D12 implementation of
RtAccelerationStructure
hold a ShaderResourceView that is created on-demand. - Rename
DescriptorSet
toD3D12DescriptorSet
. - Rename
DescriptorPool
toD3D12DescriptorPool
. - Move
DescriptorPool::Type
intoShaderResourceType.cpp:ShaderResourceType
. - Move contents of
DescriptorSet.cpp
intoD3D12DescriptorSet.cpp
- Move contents of
DescriptorPool.cpp
intoD3D12DescriptorPool.cpp
- Move
DescriptorSet.h
intoCore/API/D3D12/D3D12DescriptorSet.h
- Move
DescriptorPool.h
intoCore/API/D3D12/D3D12DescriptorPool.h
- Move
Core/BufferTypes/ParameterBlock.h
->Core/API/ParameterBlock.h
- Move
Core/BufferTypes/ParameterBlock.cpp
->Core/API/D3D12/D3D12ParameterBlock.cpp
- Move
Core/Program/ProgramVars.h
->Core/API/ProgramVars.h
- Move
Core/Program/ProgramVars.cpp
->Core/API/D3D12/D3D12ProgramVars.cpp
. - Move
RenderContext::applyGraphicsVars
andComputeContext::applyComputeVars
to D3D12 only. - Move
ProgramVars::apply
to D3D12 only. - Make
ComputeContext::prepareForDispatch
D3D12 only. Program::preprocessAndCreateProgramKernels
now only generates shader binary code for D3D12 backend. For GFX, only the aIComponentType
is needed to create agfx::IShaderProgram
.- Move Blit render pass set up logic into shared
BlitContext.h
andBlitContext.cpp
files. - Move
blit
implementation from D3D12RenderContext.cpp to RenderContext.cpp so it may be shared between D3D12 and GFX. - Move some functions from
D3D12ParameterBlock.cpp
intoParameterBlock.cpp
so they can be shared between D3D12 and GFX. - Return shared pointer from
ResourceView::getResource()
. - Wrap all uses of
DescriptorSet
in application code toFALCOR_D3D12
. - Wrap all protected member declaration in
ParameterBlock
toFALCOR_D3D12
, because they are now D3D12 specific.
Blit
- Add support for blitting between float and integer formats.
- Add error checks to
RenderContext::blit()
for unsupported combinations. - Remove unused
Blit.slang
file. - Optimize
RenderContext::blit()
to do a resource copy when possible. - Update
RenderContext::blit()
API to usekMaxRect
to specify the full rectangle (instead of -1). - Fix shader compiler warnings when initializing the blit shader.
ImageIO
- Use
nvtt
for saving DDS textures. - Add native support for DDS image loading, rather than relying on an external library.
ImageIO::loadDDS
now has original code instead of directly using the DDS loader provided by DirectXTex.- Old DirectXTex implementations have been removed.
- Compressed images can now be directly saved again.
Utilities
- Fix
removeLeadingWhitespace
,removeTrailingWhitespace
andremoveLeadingTrailingWhitespace
. - Extend
PrefixSum
to support more than 2N^2 elements, where N is the group size. - Fix
PixelDebug
when used for multiple shader dispatches within a single frame by not clearing the string hash table. - Add utilities for packing/unpacking unorm8 to
FormatConversion.slang
. - Add
ImageProcessing
utility class. - Add interval arithmetic functions in
Utils/Math/IntervalArithmetic.slang
. - Remove non-portable
StringUtils::getClassTypeName()
andStringUtils::getEnumTypeName()
.
Importer
- Use
ImporterError
exception for reporting errors during scene import. - Add new
USDImporter
scene importer.
Scene
- Cleanup handling of scene defines and type conformances.
- Add
Scene::UpdateFlags::SDFGridConfigChanged
. - Use the new acceleration structure abstraction in
Scene.cpp
for BLAS/TLAS creation. The existing raw D3D12 API calls have been replaced. - Change
Scene.cpp
to callsetAccelerationStructure
instead ofsetSrv
to bind TLAS. - Remove
pSrv
fromTlasData
. - Reorganizing BLAS/TLAS for curves: splitting the single BLAS/TLAS for procedural primitives into two (one for curves and the other for custom primitives).
- Handling transformations of cached curves using the scene graph and nodes.
Animation
- Fix
hasCurveAnimations()
: Return true if the cached curves have more than one keyframe. - Modify
Animation::addKeyframe()
to avoid O(N^2) behavior when keyframes are added in temporal order.
Geometry
- Set
instanceIndex
andgeometryIndex
when creating instance data. - Introduce
GeometryInstanceData
which unifiesMeshInstanceData
,CurveInstanceData
andSDFGridInstanceData
. - Use single list of geometry instance data for
Scene
containing instances for all geometry types. - Remove
PrimitiveTypeFlags
. - Replace
ScenePrimitiveTypes.slangh
withSceneDefines.slangh
. - Introduce
GeometryType
which enumerates all available geometry types andGeometryTypeFlags
which is a bitset thereof. - Both
GeometryType
andGeometryTypeFlags
use defines inSceneDefines.slangh
to ensure consistency. - Introduce
Scene::hasGeometryTypes
andScene::hasGeometryType
to check if scene contains specific geometry types. - Introduce
Scene::hasProceduralGeometry
to check if scene contains procedural geometry types. - Introduce
SCENE_HAS_GEOMETRY_TYPE
macro for shaders to check if scene contains a specific geometry type. - Introduce
SCENE_HAS_PROCEDURAL_GEOMETRY
macro for shaders to check if scene contains procedural geometry types.
HitInfo
PackedHitInfo
uses either 128 bits or 64 bits (compressed mode)...
4.4
Dependencies
- Update Slang to 0.19.2.
- Add header-only
lz4_stream
library from https://github.com/laudrup/lz4_stream. - Pull
dxcompiler
from packman instead of Windows SDK. Set to Oct 2020 binary release.
Core
- Add check for null
DllHandle
returned byloadDLL()
inRenderPassLibrary::loadLibrary()
. - Add parameter to
GpuFence::create()
to allow for sharing fence handles. - Fix
d3d12ResourceBarrier
implementation. - Log debug info during device creation.
- Set
mCommandsPending
flag in the context inReadTextureTask
. Fixes bug where subsequent texture reads would return nothing after the first call. - Add
dlldecl
toReadTextureTask
. - Add on a more complex version of
RenderContext::blit()
which allows to specify reduction operations (min/max/standard).- Complex blit is only used when necessary, standard blit is used otherwise.
- This uses a new
Sampler
reduction parameter which maps to D3D filter reduction.
- Fix issue preventing multiple Falcor instances from loading the same render pass DLL.
Raytracing
- Fix reflection logic for RT entry points to be compatible with future Slang versions
- Refactor
RtProgram
to allow more flexible creation of raytracing programs. - Add new
RtBindingTable
class to allow user to specify the mapping between raytracing shaders and scene geometries. - Refactor how
RtProgramVars
is created, it now takes aRtBindingTable
parameter instead ofScene
. - Add
TestRtProgram
pass and image tests for testing the new raytracing interfaces. - Add support for DXR 1.1 raytracing pipeline flags.
- Fail gracefully if raytracing is not supported on the current device.
Profiler
- Improved UI (better overview, relative CPU/GPU time bars, tooltips with stats, graph showing history, pause/resume, capture).
- Profile capturing and saving to JSON files (including stats).
- Add documentation for Python profiler API.
Scripting
- Make deferred script bindings be executed in order.
- Initialize script bindings consistently before
runInternal
in bothSample::run
versions. - Add Python pickle support for vec types.
- Extend Python API for
RenderPass
. - Add pickle support to python struct bindings created with the
SerializableStruct
helper. - Setup
__file__
in Python environment executed by Falcor.
Texture
- Add a new min/max MIP pyramid creation to textures.
- Move
Texture::createFromFile()
implementation toTexture.cpp
and removeTextureLoader.cpp
. - Add
HDR
image format to HDR image filters. - Flip
PFM
images when loaded (they are loaded flipped due to a bug). - Fix grayscale image loading from
PNG
. 16 bit greyscale PNG files were incorrectly loaded asResourceFormat::RG8Unorm
. This fix disambiguates two channel 8 bit textures from one channel 16 bit ones, and assigns formatResourceFormat::R16Unorm
when needed. - Add ability to generate mips when saving DDS textures to disk.
- Add support for volume textures in
ImageIO::saveToDDS
and fix associated bug that was uncovered inD3D12CopyContext
as a result of the new feature.
Scene
- Add
Scene
interfaces for enumerating all geometries (meshes, curves, and custom primitives). - Refactor/cleanup how intersection types and AABBs were handled in
Scene
. - Export interface for creating custom primitives from Python.
- Updated scripting documentation.
- Add conditions for refitting TLASes when it is needed.
- Make
HitInfo
a container for storing polymorphic hit information (TriangleHit
,DisplacedTriangleHit
andCurveHit
). - Update
HitInfo
to have aNone
type to be able to represent no hit more cleanly. - Add
GeometryInstanceID
type to enumerate instances on the GPU side instead of plainuint
. - Replace
meshInstanceID
withGeometryInstanceID
in allScene
accessors on the GPU. - Fix some robustness issues where only triangle hits were assumed.
- Add
updateCallback
toScene
to procedurally update scene at the start of each frame. - Add an
Scene::Metadata
struct that holds optional metadata, set by an importer, regarding how the scene should be rendered.- Parameters can be queried by passes in their
setScene()
method, as demonstrated in theToneMapper
pass.
- Parameters can be queried by passes in their
- Move global
gRtScene
toScene.rtAccel
. - Add support for dynamically adding/removing custom primitives.
- Add
Scene
update flag to indicate that geometry changed (added/removed). - Improve support for custom primitives: metadata buffer and indexing.
- Add
Scene
interface for updating custom primitive AABBs.- Trigger acceleration structure refit/rebuild upon procedural primitive updates.
- Some refactoring of
Scene
to prepare for unification of geometry types. - Update ray query interface to ignore unsupported geometry types.
- Add testing code for scene geometry editing.
- Add a mesh-binding transform parameter in the scene graph for use by skinned meshes.
- Cleaned up some leftover usage of
glm::mat4
- Fix a couple places where cameras and other
Animatable
objects aren't using -Z for their forward direction. - Add
ISceneRayQuery
, an abstract interface to intersect rays against the scene. - Add
SceneRayQuery
implementation inRaytracingInline
to intersect rays against the scene usingTraceRayInline
. - Make use of
SceneRayQuery
inSceneDebugger
,VBufferRT
andGBufferRT
passes. - Add
TextureAnalyzer
utility for analyzing texture content. - Extend
TextureAnalyzer
util to compute min/max and range flags. - Replace custom
HitShaderParams
uniform with using DXR Tier 1.1GeometryIndex()
. - Add scene stats for opaque vs non-opaque geometries for ray tracing.
- Update
Scene::rasterize
interface to take cull mode parameter or separate raster states, to fix backface culling.- Update
GBufferRaster
,ModelViewer
,SkyBox
to use newScene::rasterize
interface.
- Update
- Add
SceneBuilder
pass to make triangle winding consistent in object space, which is a requirement for backface culling. - Update
Scene
TLAS build to set per-instance triangle winding flag correctly. - Add image test to verify backface culling with CW/CCW winding and/or with instance transforms that flip winding.
- Fix asynchronous scene cache texture loading.
- Add
SceneCache
to serialize/deserializeScene:SceneData
. - Add scene caching support to
SceneBuilder
. - Introduce
SceneData
to pass data when creating aScene
object. - Check mesh instance triangle winding flag when preparing draw argument buffers in
Scene
. - Issue warning for non-affine node transforms and force last row to (0,0,0,1).
- Discard w-component of world-space position in raster code to match ray tracing behavior.
- Fix
Scene
logic to disable use of analytic lights in path tracer when all lights are inactive. - Add
SceneBuilder
optimization to collapse directed subgraphs of static transform nodes. - Add
SceneBuilder
optimization to merge identical static transform nodes. - Extend
SceneDebugger
to show mesh instance information, including the transform hierarchy for the selected mesh. - Add scene defines after loading. They can help the shader code to dynamically decide on ray query flags, creation of intersection shader programs, etc.
- Add
SceneBuilder
flag,FlattenStaticMeshInstances
, that will create a unique mesh for each static instance by composing its transforms and duplicating mesh data. This will increase memory use, sometimes significantly.- Has no effect on non-instanced meshes, dynamic meshes, animated instances, or non-mesh primitives.
- Subsequent
SceneBuilder
optimization passes, such aspretransformStaticMeshes()
, can further optimize the flattened scene graph.
- Add optimization to
SceneBuilder
to extract instances for groups of meshes. - Meshes for instanced mesh groups are by default merged into a BLAS. Use
RTDontMergeInstanced
to disable. - Clean up TLAS instance description setup in
Scene
. - Add
SceneBuilder::getLight
. - Add scene stats for opaque vs non-opaque materials, make all stats serialized to Python.
- Add material optimization pass to
SceneBuilder
to replace constant textures by uniform material parameters. - Add
waitForMaterialTextureLoading
toSceneBuilder
. - When a vertex attribute (e.g., texture coordinates) is missing, use a default value.
- Allow disabling displacement maps with new
DontUseDisplacement
scene builder flag. - Add option to
SceneBuilder::processMesh()
to return the indices per attribute used to generate the final mesh. - Add inverse transpose matrices of previous frame in
Scene
. - Fix indexing into shader binding table by sorting meshes within mesh groups.
Scene Importers
- Remove deprecated
fscene
support. - Allow retrying when python scene loader fails.
- Log error if
.pyscene
is recursively imported. - Fix loading nested
pyscene
files (not removing data path if still used by parent importer). - Fix GLTF2 animation loading.
- Fix GLTF2 point light loading.
Animation
- Add
AnimatedVertexCache
, which is in charge of updating animated curve vertices and related AABBs. - Allow skinned meshes to use the transform from somewhere else in the scene graph for skinning.
- Separate bind matrix and world matrix indices in
DynamicVertexData
. - Fix toggle scene animations (missed TLAS update).
- Improve
AnimationController
behavior when enabling/disabling it. - Update previous frame data for one more frame when pausing animations to get correct motion vectors.
- Improve performance of
AnimationController
by only updating/uploading animated matrices. - Fix issue with animated lights not updating.
Geometry
- Extend
TriangleMesh
utility class to handle negative scaling and clockwise triangle winding. - Flip UVs in
TriangleMesh::createFromFile
. - Add
CurveIntersector
helper to unify curve intersection code between dispatch ray and ra...