virtualx-engine/servers/rendering/renderer_rd/effects/SCsub
Dario 057367bf4f Add FidelityFX Super Resolution 2.2 (FSR 2.2.1) support.
Introduces support for FSR2 as a new upscaler option available from the project settings. Also introduces an specific render list for surfaces that require motion and the ability to derive motion vectors from depth buffer and camera motion.
2023-09-25 10:37:47 -03:00

34 lines
954 B
Python

#!/usr/bin/env python
Import("env")
env_effects = env.Clone()
# Thirdparty source files
thirdparty_obj = []
thirdparty_dir = "#thirdparty/amd-fsr2/"
thirdparty_sources = ["ffx_assert.cpp", "ffx_fsr2.cpp"]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_effects.Prepend(CPPPATH=[thirdparty_dir])
# This flag doesn't actually control anything GCC specific in FSR2. It determines
# if symbols should be exported, which is not required for Godot.
env_effects.Append(CPPDEFINES=["FFX_GCC"])
env_thirdparty = env_effects.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
env.servers_sources += thirdparty_obj
# Godot source files
module_obj = []
env_effects.add_source_files(module_obj, "*.cpp")
env.servers_sources += module_obj
# Needed to force rebuilding the module files when the thirdparty library is updated.
env.Depends(module_obj, thirdparty_obj)