summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_compositor_rd.cpp')
-rw-r--r--servers/rendering/renderer_rd/renderer_compositor_rd.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
index 2247b841c9..cb3e67e990 100644
--- a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
@@ -175,5 +175,14 @@ RendererCompositorRD::RendererCompositorRD() {
storage = memnew(RendererStorageRD);
canvas = memnew(RendererCanvasRenderRD(storage));
- scene = memnew(RendererSceneRenderImplementation::RenderForwardClustered(storage));
+
+ uint32_t back_end = GLOBAL_GET("rendering/vulkan/rendering/back_end");
+ uint32_t textures_per_stage = RD::get_singleton()->limit_get(RD::LIMIT_MAX_TEXTURES_PER_SHADER_STAGE);
+
+ if (back_end == 1 || textures_per_stage < 48) {
+ scene = memnew(RendererSceneRenderImplementation::RenderForwardMobile(storage));
+ } else { // back_end == 0
+ // default to our high end renderer
+ scene = memnew(RendererSceneRenderImplementation::RenderForwardClustered(storage));
+ }
}