diff options
author | Bastiaan Olij <mux213@gmail.com> | 2022-04-29 17:10:54 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2022-05-11 11:08:56 +1000 |
commit | 9939cfc4c48e9f76fd11fa481481012077aad741 (patch) | |
tree | 0255f768348292984d58843c6b9c738cad3f794e /modules/openxr/extensions | |
parent | 1eebf0d789f44870a32a1b36a6609a19647a836f (diff) |
Split out bokeh_dof and copy effects
Diffstat (limited to 'modules/openxr/extensions')
-rw-r--r-- | modules/openxr/extensions/openxr_vulkan_extension.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/openxr/extensions/openxr_vulkan_extension.cpp b/modules/openxr/extensions/openxr_vulkan_extension.cpp index 1eb7635a82..2ddf3b8a7d 100644 --- a/modules/openxr/extensions/openxr_vulkan_extension.cpp +++ b/modules/openxr/extensions/openxr_vulkan_extension.cpp @@ -33,6 +33,7 @@ #include "../extensions/openxr_vulkan_extension.h" #include "../openxr_api.h" #include "../openxr_util.h" +#include "servers/rendering/renderer_rd/effects/copy_effects.h" #include "servers/rendering/renderer_rd/renderer_storage_rd.h" #include "servers/rendering/renderer_rd/storage_rd/texture_storage.h" #include "servers/rendering/rendering_server_globals.h" @@ -450,11 +451,9 @@ bool OpenXRVulkanExtension::copy_render_target_to_image(RID p_from_render_target ERR_FAIL_COND_V(fb.is_null(), false); // Our vulkan extension can only be used in conjunction with our vulkan renderer. - // We need access to the effects object in order to have access to our copy logic. - // Breaking all the rules but there is no nice way to do this. - EffectsRD *effects = RendererStorageRD::base_singleton->get_effects(); - ERR_FAIL_NULL_V(effects, false); - effects->copy_to_fb_rect(source_image, fb, Rect2i(), false, false, false, false, depth_image, data->is_multiview); + RendererRD::CopyEffects *copy_effects = RendererRD::CopyEffects::get_singleton(); + ERR_FAIL_NULL_V(copy_effects, false); + copy_effects->copy_to_fb_rect(source_image, fb, Rect2i(), false, false, false, false, depth_image, data->is_multiview); return true; } |