From 3898ca5c0984ef63aeb37e6ff366ff02f5123cc9 Mon Sep 17 00:00:00 2001 From: Nathaniel Warner Date: Wed, 16 Dec 2020 14:16:30 -0800 Subject: [PATCH] Fix aiport signs appearing black when photoscenery enabled --- simgear/scene/tgdb/apt_signs.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simgear/scene/tgdb/apt_signs.cxx b/simgear/scene/tgdb/apt_signs.cxx index 9343fbd0..7c59b2f8 100644 --- a/simgear/scene/tgdb/apt_signs.cxx +++ b/simgear/scene/tgdb/apt_signs.cxx @@ -211,6 +211,13 @@ GlyphGeometry* makeGeometry(Effect* eff, osg::Group* group) geometry->addPrimitiveSet(gg->quads); geode->addDrawable(geometry); group->addChild(geode); + + // Because the airport signs are rendered with some of the same shaders as terrain, + // we need to explicitly set orthophotoAvailable to false. + osg::StateSet *stateSet = group->getOrCreateStateSet(); + osg::ref_ptr orthophotoAvailable = stateSet->getOrCreateUniform("orthophotoAvailable", osg::Uniform::Type::BOOL); + orthophotoAvailable->set(false); + return gg; }