From Mathia Walker: bug fix to LOD ranges in TXP plugin to avoid cracks:
"I took a closer look at the conditional code in SeamFinder::seamReplacement(). Because _info.minRange is a double and lod->getMinRange(0) is a float, the difference will be calculated with double precision. If _info.minRange is cast as a float it is exactly the same value as lod->getMinRange(0) and the difference is exactly zero. So if you change if((fabs(_info.minRange-lod->getMinRange(0))<0.001)&&(fabs(_info.lod0Range-lod->getMaxRange(0))<0.001)) to if((fabs((float)_info.minRange-lod->getMinRange(0))<0.001)&&(fabs((float)_info.lod0Range-lod->getMaxRange(0))<0.001)) it works a lot better."
This commit is contained in:
@@ -296,7 +296,7 @@ osg::Node* SeamFinder::seamReplacement(osg::Node* node)
|
||||
}
|
||||
|
||||
// low res seam has min/max ranges of lod+1 range/lod 0 range
|
||||
if ((fabs(_info.minRange-lod->getMinRange(0))<0.001)&&(fabs(_info.lod0Range-lod->getMaxRange(0))<0.001))
|
||||
if ((fabs((float)_info.minRange-lod->getMinRange(0))<0.001)&&(fabs((float)_info.lod0Range-lod->getMaxRange(0))<0.001))
|
||||
{
|
||||
|
||||
if (loRes==0)
|
||||
|
||||
Reference in New Issue
Block a user