ColorMask *mask = new ColorMask;
Vec4 m = getColor(realProp);
- mask->setMask(m.r(), m.g(), m.b(), m.a());
+ mask->setMask(m.r() > 0.0, m.g() > 0.0, m.b() > 0.0, m.a() > 0.0);
pass->setAttributeAndModes(mask);
}
};
{
for(ShaderMap::iterator sitr = shaderMap.begin(); sitr != shaderMap.end(); ++sitr)
{
- Shader *shader = sitr->second.get();
- string fileName = osgDB::findDataFile(sitr->first.first);
+ Shader *shader = sitr->second.get();
+ string fileName = SGModelLib::findDataFile(sitr->first.first);
if (!fileName.empty()) {
- shader->loadShaderSourceFromFile(fileName);
+ shader->loadShaderSourceFromFile(fileName);
}
}
}
{
const string& shaderName = shaderKey.first;
Shader::Type stype = shaderKey.second;
- string fileName = osgDB::findDataFile(shaderName, options);
+ string fileName = SGModelLib::findDataFile(shaderName, options);
if (fileName.empty())
throw BuilderException(string("couldn't find shader ") +
shaderName);