#1230 Use transparent on low values

This commit is contained in:
Magne Sjaastad 2017-02-20 11:03:18 +01:00
parent 6c5410f41a
commit b510979151

View File

@ -162,15 +162,31 @@ void RivWellFracturePartMgr::updatePartGeometryTexture(caf::DisplayCoordTransfor
for (double gridXdata : mirroredValuesAtDepth)
{
cvf::Vec2f texCoord = scalarMapper->mapToTextureCoord(gridXdata);
if (gridXdata > 1e-7)
{
texCoord[1] = 0; // Set the Y texture coordinate to the opaque line in the texture
}
textureCoords->set(i, texCoord);
i++;
}
}
geo->setTextureCoordArray(textureCoords.p());
caf::ScalarMapperEffectGenerator scalarMapperEffectGenerator(scalarMapper, caf::PO_NEG_LARGE);
cvf::ref<cvf::Effect> eff = scalarMapperEffectGenerator.generateCachedEffect();
caf::ScalarMapperEffectGenerator effGen(scalarMapper, caf::PO_NEG_LARGE);
effGen.setOpacityLevel(0.2f);
if (activeView && activeView->isLightingDisabled())
{
effGen.disableLighting(true);
}
m_part->setPriority(1500);
cvf::ref<cvf::Effect> eff = effGen.generateCachedEffect();
m_part->setEffect(eff.p());
}