From 99a90cb649c5d26e3a55c5ffd8d9b7982974b373 Mon Sep 17 00:00:00 2001 From: Haroon Qureshi Date: Mon, 8 Dec 2025 23:43:57 -0800 Subject: [PATCH] Don't do GUI rendering when rendering to texture. PiperOrigin-RevId: 842089364 Change-Id: Iaecebdc677e946c7fc618395205097462a56f2d1 --- src/experimental/filament/filament/filament_context.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/experimental/filament/filament/filament_context.cc b/src/experimental/filament/filament/filament_context.cc index 672f1541..389562d1 100644 --- a/src/experimental/filament/filament/filament_context.cc +++ b/src/experimental/filament/filament/filament_context.cc @@ -145,7 +145,7 @@ void FilamentContext::Render(const mjrRect& viewport, const mjvScene* scene, // Draw the GUI. We do this after processing the scene in case there are any // label elements in the scene. - if (gui_view_) { + if (gui_view_ && !render_to_texture_) { DrawGui(scene_view_.get()); // Prepare the filament Renderable that contains the GUI draw commands. We