Skip to content

Commit

Permalink
[vulkan] tempo workaround for nvidia (will fix tomorrow)
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Feb 3, 2025
1 parent c26d2d3 commit 8851a36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions runtime/RHI/Vulkan/Vulkan_FidelityFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,9 @@ namespace spartan

// documentation: https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/main/docs/techniques/stochastic-screen-space-reflections.md

// end the render pass (if there is one) as third-party code takes over here
cmd_list->RenderPassEnd();

// set resources
sssr::description_dispatch.commandList = to_ffx_cmd_list(cmd_list);
sssr::description_dispatch.color = to_ffx_resource(tex_color, L"sssr_color");
Expand Down Expand Up @@ -1368,6 +1371,9 @@ namespace spartan
if (debug_update)
return;

// end the render pass (if there is one) as third-party code takes over here
cmd_list->RenderPassEnd();

// set camera matrices
set_ffx_float16(brixelizer_gi::description_dispatch_gi.view, view);
set_ffx_float16(brixelizer_gi::description_dispatch_gi.prevView, view_previous);
Expand Down
2 changes: 1 addition & 1 deletion runtime/Rendering/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ namespace spartan
SetOption(Renderer_Option::DepthOfField, 1.0f);
SetOption(Renderer_Option::ScreenSpaceAmbientOcclusion, 1.0f);
SetOption(Renderer_Option::ScreenSpaceShadows, static_cast<float>(Renderer_ScreenspaceShadow::Bend));
SetOption(Renderer_Option::ScreenSpaceReflections, 1.0f);
SetOption(Renderer_Option::ScreenSpaceReflections, RHI_Device::GetPrimaryPhysicalDevice()->IsAmd() ? 1.0f : 0.0f); // temp workaround until I fix ssr for nvidia
SetOption(Renderer_Option::GlobalIllumination, 0.5f); // 0.5 is the percentage of the internal resolution (options are 25%, 50%, 75% and 100%)
SetOption(Renderer_Option::Anisotropy, 16.0f);
SetOption(Renderer_Option::ShadowResolution, 4096.0f);
Expand Down
2 changes: 0 additions & 2 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,6 @@ namespace spartan
{
cmd_list->BeginTimeblock("ssr");

cmd_list->RenderPassEnd();

RHI_FidelityFX::SSSR_Dispatch(
cmd_list,
GetOption<float>(Renderer_Option::ResolutionScale),
Expand Down
3 changes: 2 additions & 1 deletion runtime/Rendering/Renderer_Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ namespace spartan
const string dir_font = ResourceCache::GetResourceDirectory(ResourceDirectory::Fonts) + "\\";

// load a font
standard_font = make_shared<Font>(dir_font + "OpenSans/OpenSans-Medium.ttf", 16, Color(0.9f, 0.9f, 0.9f, 1.0f));
uint32_t size = static_cast<uint32_t>(16 * Window::GetDpiScale()); // maintain a consistent font size across different resolutions
standard_font = make_shared<Font>(dir_font + "OpenSans/OpenSans-Medium.ttf", size, Color(0.9f, 0.9f, 0.9f, 1.0f));
}

void Renderer::CreateStandardMeshes()
Expand Down

0 comments on commit 8851a36

Please sign in to comment.