Skip to content

Commit

Permalink
[Metal] Revert RenderOrder is in different scale in Reverse Z gazebos…
Browse files Browse the repository at this point in the history
…im#514

Signed-off-by: Rhys Mainwaring <[email protected]>
  • Loading branch information
srmainwaring committed Sep 19, 2024
1 parent e227df6 commit 1fea09b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ogre2/src/Ogre2Material.cc
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ void Ogre2Material::SetRenderOrder(const float _renderOrder)
Ogre::Root *root = Ogre2RenderEngine::Instance()->OgreRoot();
Ogre::RenderSystem *renderSystem = root->getRenderSystem();

if (renderSystem->isReverseDepth())
if (renderSystem->isReverseDepth() &&
Ogre2RenderEngine::Instance()->GraphicsAPI() != GraphicsAPI::METAL)
{
// Reverse depth needs 100x scale AND ends up being superior
// See https://github.com/gazebosim/gz-rendering/
Expand Down

0 comments on commit 1fea09b

Please sign in to comment.