diff --git a/src/mods/VR.cpp b/src/mods/VR.cpp index 9079f8dc..a2ab720d 100644 --- a/src/mods/VR.cpp +++ b/src/mods/VR.cpp @@ -1239,6 +1239,14 @@ void VR::update_hmd_state(bool from_view_extensions, uint32_t frame_count) { sdk::set_cvar_int(L"Renderer", L"r.HZBOcclusion", 0); } } + + if (m_disable_instance_culling->value()) { + const auto r_instance_culling_value = sdk::get_cvar_int(L"Renderer", L"r.InstanceCulling.OcclusionCull"); + + if (r_instance_culling_value && *r_instance_culling_value != 0) { + sdk::set_cvar_int(L"Renderer", L"r.InstanceCulling.OcclusionCull", 0); + } + } } if (frame_count != 0 && is_using_afr() && frame_count % 2 == 0) { @@ -1951,6 +1959,7 @@ void VR::on_draw_ui() { ImGui::BeginGroup(); m_disable_hzbocclusion->draw("Disable HZBOcclusion"); + m_disable_instance_culling->draw("Disable Instance Culling"); m_disable_hdr_compositing->draw("Disable HDR Composition"); m_disable_blur_widgets->draw("Disable Blur Widgets"); m_uncap_framerate->draw("Uncap Framerate"); diff --git a/src/mods/VR.hpp b/src/mods/VR.hpp index 35033544..891722bf 100644 --- a/src/mods/VR.hpp +++ b/src/mods/VR.hpp @@ -662,6 +662,7 @@ class VR : public Mod { const ModToggle::Ptr m_disable_blur_widgets{ ModToggle::create(generate_name("DisableBlurWidgets"), true) }; const ModToggle::Ptr m_disable_hdr_compositing{ ModToggle::create(generate_name("DisableHDRCompositing"), true) }; const ModToggle::Ptr m_disable_hzbocclusion{ ModToggle::create(generate_name("DisableHZBOcclusion"), true) }; + const ModToggle::Ptr m_disable_instance_culling{ ModToggle::create(generate_name("DisableInstanceCulling"), true) }; const ModToggle::Ptr m_desktop_fix{ ModToggle::create(generate_name("DesktopRecordingFix_V2"), true) }; const ModToggle::Ptr m_enable_gui{ ModToggle::create(generate_name("EnableGUI"), true) }; const ModToggle::Ptr m_enable_depth{ ModToggle::create(generate_name("EnableDepth"), false) }; @@ -729,6 +730,7 @@ class VR : public Mod { *m_uncap_framerate, *m_disable_hdr_compositing, *m_disable_hzbocclusion, + *m_disable_instance_culling, *m_desktop_fix, *m_enable_gui, *m_enable_depth,