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 <rhys.mainwaring@me.com>
  • Loading branch information
srmainwaring committed Jul 8, 2023
1 parent 9f32fcc commit c9dc8cb
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 @@ -403,7 +403,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 c9dc8cb

Please sign in to comment.