mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1230 Use transparent on low values
This commit is contained in:
parent
6c5410f41a
commit
b510979151
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user