diff --git a/engine/core/include/scene.hpp b/engine/core/include/scene.hpp index bc7f820..2abe7ac 100755 --- a/engine/core/include/scene.hpp +++ b/engine/core/include/scene.hpp @@ -238,6 +238,7 @@ public: std::array spot_light_dirty; int shadow_refresh_timer = 5; + int probe_refresh_timer = 5; // environment std::array environment_dirty; diff --git a/engine/renderer/src/scenecapture.cpp b/engine/renderer/src/scenecapture.cpp index cd47bc1..54ab299 100755 --- a/engine/renderer/src/scenecapture.cpp +++ b/engine/renderer/src/scenecapture.cpp @@ -156,6 +156,11 @@ void SceneCapture::create_scene_resources(Scene& scene) { } void SceneCapture::render(GFXCommandBuffer* command_buffer, Scene* scene) { + if(scene->probe_refresh_timer > 0) { + scene->probe_refresh_timer--; + return; + } + int last_probe = 0; auto probes = scene->get_all(); for(auto [obj, probe] : probes) {