From 42d845455586f33a9a225ab485a5ae2611280aa1 Mon Sep 17 00:00:00 2001 From: Google DeepMind Date: Fri, 22 Aug 2025 06:40:56 -0700 Subject: [PATCH] Internal change. PiperOrigin-RevId: 798190254 Change-Id: Ie3a3b6e074511991cc6ccb35f2c26c6d9ae7ccd8 --- python/mujoco/renderer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/mujoco/renderer.py b/python/mujoco/renderer.py index 47fb14dd..d21033c5 100644 --- a/python/mujoco/renderer.py +++ b/python/mujoco/renderer.py @@ -242,7 +242,10 @@ the clause: else: _render.mjr_readPixels(out, None, self._rect, self._mjr_context) - out[:] = np.flipud(out) + if self._gl_context: + # If using EGL, OSMesa, or GLFW, the output image is flipped vertically. + # No flip is needed for Filament. + out[:] = np.flipud(out) return out