diff --git a/runtime/RHI/RHI_AMD_FidelityFX.h b/runtime/RHI/RHI_AMD_FidelityFX.h index 101ca81d7..1467104af 100644 --- a/runtime/RHI/RHI_AMD_FidelityFX.h +++ b/runtime/RHI/RHI_AMD_FidelityFX.h @@ -53,7 +53,8 @@ namespace Spartan RHI_Texture* tex_output, Camera* camera, float delta_time, - float sharpness + float sharpness, + float exposure ); }; } diff --git a/runtime/RHI/Vulkan/Vulkan_AMD_FidelityFX.cpp b/runtime/RHI/Vulkan/Vulkan_AMD_FidelityFX.cpp index 7f48e753f..7affe354f 100644 --- a/runtime/RHI/Vulkan/Vulkan_AMD_FidelityFX.cpp +++ b/runtime/RHI/Vulkan/Vulkan_AMD_FidelityFX.cpp @@ -275,7 +275,8 @@ namespace Spartan RHI_Texture* tex_output, Camera* camera, float delta_time_sec, - float sharpness + float sharpness, + float exposure ) { // transition to the appropriate layouts (will only happen if needed) @@ -322,7 +323,7 @@ namespace Spartan fsr2_dispatch_description.enableSharpening = sharpness != 0.0f; fsr2_dispatch_description.sharpness = sharpness; fsr2_dispatch_description.frameTimeDelta = delta_time_sec * 1000.0f; // seconds to milliseconds - fsr2_dispatch_description.preExposure = 1.0f; // the exposure value if not using FFX_FSR2_ENABLE_AUTO_EXPOSURE + fsr2_dispatch_description.preExposure = exposure; // the exposure value if not using FFX_FSR2_ENABLE_AUTO_EXPOSURE fsr2_dispatch_description.renderSize.width = tex_input->GetWidth(); // the resolution that was used for rendering the input resources fsr2_dispatch_description.renderSize.height = tex_input->GetHeight(); // the resolution that was used for rendering the input resources fsr2_dispatch_description.cameraNear = camera->GetFarPlane(); // far as near because we are using reverse-z diff --git a/runtime/Rendering/Renderer_Passes.cpp b/runtime/Rendering/Renderer_Passes.cpp index 09ad96309..14dab614c 100644 --- a/runtime/Rendering/Renderer_Passes.cpp +++ b/runtime/Rendering/Renderer_Passes.cpp @@ -1919,7 +1919,8 @@ namespace Spartan tex_out, GetCamera().get(), m_cb_frame_cpu.delta_time, - sharpness + sharpness, + GetOption(Renderer_Option::Exposure) ); cmd_list->EndTimeblock();