From 06ecfe1927d811fb1d362cbcb9d04c42dd336f6a Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sat, 18 Dec 2021 21:45:50 +0000 Subject: [PATCH] WS30: Revert to green channel for texture atlas --- simgear/scene/tgdb/VPBTechnique.cxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/simgear/scene/tgdb/VPBTechnique.cxx b/simgear/scene/tgdb/VPBTechnique.cxx index 4e116d58..837ef90a 100644 --- a/simgear/scene/tgdb/VPBTechnique.cxx +++ b/simgear/scene/tgdb/VPBTechnique.cxx @@ -1355,14 +1355,7 @@ void VPBTechnique::applyColorLayers(BufferData& buffer, Locator* masterLocator) for (unsigned int t = 0; t < (unsigned int) image->t(); t++) { osg::Vec4d c = image->getColor(s, t); int i = int(round(c.x() * 255.0)); - - // Get texture 0 for this material to save a Uniform lookup in the shader for - // maximal performance on single-texture shaders - osg::Vec4f texture1; - if (! atlas.textureLookup1->getElement(atlasIndex[i], texture1)) { - SG_LOG(SG_TERRAIN, SG_ALERT, "Failed to do texture lookup for landclass: " << atlasIndex[i]); - } - c.set((double) (atlasIndex[i] / 255.0), texture1.r(), texture1.g(), texture1.b()); + c.set(c.x(), (double) (atlasIndex[i] / 255.0), c.z(), c.w() ); image->setColor(c, s, t); } }