]> git.mxchange.org Git - simgear.git/commitdiff
Revert commit 7864516... Increase point sprite size for runway lights
authorFrederic Bouvier <fredfgfs01@free.fr>
Wed, 7 Mar 2012 19:16:14 +0000 (20:16 +0100)
committerFrederic Bouvier <fredfgfs01@free.fr>
Wed, 7 Mar 2012 19:16:14 +0000 (20:16 +0100)
simgear/scene/tgdb/obj.cxx
simgear/scene/tgdb/pt_lights.cxx

index 9b8e75d2b1ec0a33608885a7df6ef8c779229e21..c899d8ae9378f430d744adca8f19e3ef0c30cb97 100644 (file)
@@ -756,7 +756,7 @@ SGLoadBTG(const std::string& path, const simgear::SGReaderWriterOptions* options
   if (!tileGeometryBin.vasiLights.empty()) {
     EffectGeode* vasiGeode = new EffectGeode;
     Effect* vasiEffect
-        = getLightEffect(32, osg::Vec3(1, 0.0001, 0.000001), 1, 32, true);
+        = getLightEffect(24, osg::Vec3(1, 0.0001, 0.000001), 1, 24, true);
     vasiGeode->setEffect(vasiEffect);
     SGVec4f red(1, 0, 0, 1);
     SGMaterial* mat = 0;
@@ -782,8 +782,9 @@ SGLoadBTG(const std::string& path, const simgear::SGReaderWriterOptions* options
   if (tileGeometryBin.runwayLights.getNumLights() > 0
       || !tileGeometryBin.rabitLights.empty()
       || !tileGeometryBin.reilLights.empty()
-      || !tileGeometryBin.odalLights.empty())
-      runwayEffect = getLightEffect(32, osg::Vec3(1, 0.001, 0.0002), 2, 32, true);
+      || !tileGeometryBin.odalLights.empty()
+      || tileGeometryBin.taxiLights.getNumLights() > 0)
+      runwayEffect = getLightEffect(16, osg::Vec3(1, 0.001, 0.0002), 1, 16, true);
   if (tileGeometryBin.runwayLights.getNumLights() > 0
       || !tileGeometryBin.rabitLights.empty()
       || !tileGeometryBin.reilLights.empty()
@@ -816,12 +817,11 @@ 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(taxiEffect);
+    geode->setEffect(runwayEffect);
     geode->addDrawable(SGLightFactory::getLights(tileGeometryBin.taxiLights));
     taxiLights->addChild(geode);
     lightGroup->addChild(taxiLights);
index a072061ac056d1accac62247e8f0eabbabb2c2b2..a1c539399ff8bc32fcfd53446a99aa7e9a31d56f 100644 (file)
@@ -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(40.0f, osg::Vec3(1.0, 0.0001, 0.00000001),
-                                  10.0f, 40.0f, true);
+  Effect* effect = getLightEffect(10.0f, osg::Vec3(1.0, 0.0001, 0.00000001),
+                                  6.0f, 10.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(40.0f, osg::Vec3(1.0, 0.0001, 0.00000001),
-                                  10.0, 40.0, false);
+  Effect* effect = getLightEffect(10.0f, osg::Vec3(1.0, 0.0001, 0.00000001),
+                                  6.0, 10.0, false);
   // centerline lights
   for (int i = lights.getNumLights() - 1; 2 <= i; --i) {
     EffectGeode* egeode = new EffectGeode;