From 78645169bfd1d715955822b6376d3fbe84604d46 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Tue, 31 Jan 2012 23:40:19 +0100 Subject: [PATCH] Increase point sprite size for runway lights --- simgear/scene/tgdb/obj.cxx | 10 +++++----- simgear/scene/tgdb/pt_lights.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/simgear/scene/tgdb/obj.cxx b/simgear/scene/tgdb/obj.cxx index c899d8ae..2e8b7c58 100644 --- a/simgear/scene/tgdb/obj.cxx +++ b/simgear/scene/tgdb/obj.cxx @@ -756,7 +756,7 @@ SGLoadBTG(const std::string& path, const simgear::SGReaderWriterOptions* options if (!tileGeometryBin.vasiLights.empty()) { EffectGeode* vasiGeode = new EffectGeode; Effect* vasiEffect - = getLightEffect(24, osg::Vec3(1, 0.0001, 0.000001), 1, 24, true); + = getLightEffect(48, osg::Vec3(1, 0.0001, 0.000001), 1, 48, true); vasiGeode->setEffect(vasiEffect); SGVec4f red(1, 0, 0, 1); SGMaterial* mat = 0; @@ -782,9 +782,8 @@ SGLoadBTG(const std::string& path, const simgear::SGReaderWriterOptions* options if (tileGeometryBin.runwayLights.getNumLights() > 0 || !tileGeometryBin.rabitLights.empty() || !tileGeometryBin.reilLights.empty() - || !tileGeometryBin.odalLights.empty() - || tileGeometryBin.taxiLights.getNumLights() > 0) - runwayEffect = getLightEffect(16, osg::Vec3(1, 0.001, 0.0002), 1, 16, true); + || !tileGeometryBin.odalLights.empty()) + runwayEffect = getLightEffect(32, osg::Vec3(1, 0.001, 0.0002), 2, 32, true); if (tileGeometryBin.runwayLights.getNumLights() > 0 || !tileGeometryBin.rabitLights.empty() || !tileGeometryBin.reilLights.empty() @@ -817,11 +816,12 @@ SGLoadBTG(const std::string& path, const simgear::SGReaderWriterOptions* options } if (tileGeometryBin.taxiLights.getNumLights() > 0) { + Effect* taxiEffect = getLightEffect(16, osg::Vec3(1, 0.001, 0.0002), 1, 16, true); osg::Group* taxiLights = new osg::Group; taxiLights->setStateSet(lightManager->getTaxiLightStateSet()); taxiLights->setNodeMask(RUNWAYLIGHTS_BIT); EffectGeode* geode = new EffectGeode; - geode->setEffect(runwayEffect); + geode->setEffect(taxiEffect); geode->addDrawable(SGLightFactory::getLights(tileGeometryBin.taxiLights)); taxiLights->addChild(geode); lightGroup->addChild(taxiLights); diff --git a/simgear/scene/tgdb/pt_lights.cxx b/simgear/scene/tgdb/pt_lights.cxx index a1c53939..a072061a 100644 --- a/simgear/scene/tgdb/pt_lights.cxx +++ b/simgear/scene/tgdb/pt_lights.cxx @@ -478,8 +478,8 @@ SGLightFactory::getSequenced(const SGDirectionalLightBin& lights) float flashTime = 2e-2 + 5e-3*sg_random(); osg::Sequence* sequence = new osg::Sequence; sequence->setDefaultTime(flashTime); - Effect* effect = getLightEffect(10.0f, osg::Vec3(1.0, 0.0001, 0.00000001), - 6.0f, 10.0f, true); + Effect* effect = getLightEffect(40.0f, osg::Vec3(1.0, 0.0001, 0.00000001), + 10.0f, 40.0f, true); for (int i = lights.getNumLights() - 1; 0 <= i; --i) { EffectGeode* egeode = new EffectGeode; egeode->setEffect(effect); @@ -505,8 +505,8 @@ SGLightFactory::getOdal(const SGLightBin& lights) float flashTime = 2e-2 + 5e-3*sg_random(); osg::Sequence* sequence = new osg::Sequence; sequence->setDefaultTime(flashTime); - Effect* effect = getLightEffect(10.0f, osg::Vec3(1.0, 0.0001, 0.00000001), - 6.0, 10.0, false); + Effect* effect = getLightEffect(40.0f, osg::Vec3(1.0, 0.0001, 0.00000001), + 10.0, 40.0, false); // centerline lights for (int i = lights.getNumLights() - 1; 2 <= i; --i) { EffectGeode* egeode = new EffectGeode;