1
0
Fork 0

WS30 - remove separate water mesh option

No longer required now water shader integrated into
main ws30 shader.  Also clean up.
This commit is contained in:
Stuart Buchanan 2022-11-08 21:47:41 +00:00
parent 0deaec870a
commit 6d76b657d6
2 changed files with 1 additions and 6 deletions

View file

@ -785,7 +785,7 @@ void GS::update( double dt, const SGGeod & aircraftPosition )
double offset = _targetGlideslope_deg - gsDirect; double offset = _targetGlideslope_deg - gsDirect;
if( offset < 0.0 ) if( offset < 0.0 )
offset = _targetGlideslope_deg/2 * sawtooth(2.0*offset/_targetGlideslope_deg); offset = _targetGlideslope_deg/2 * sawtooth(2.0*offset/_targetGlideslope_deg);
assert( !SGMisc<double>::isNaN(offset) ); assert( !SGMisc<double>::isNaN(offset) );
// GS is documented to be 1.4 degrees thick, // GS is documented to be 1.4 degrees thick,
// i.e. plus or minus 0.7 degrees from the midline: // i.e. plus or minus 0.7 degrees from the midline:
_glideslopeOffset_norm = SGMiscd::clip(offset/0.7, -1.0, 1.0); _glideslopeOffset_norm = SGMiscd::clip(offset/0.7, -1.0, 1.0);

View file

@ -280,10 +280,8 @@ public:
{ {
SGPropertyNode_ptr elevationMeshNode = fgGetNode(root_node_path, true); SGPropertyNode_ptr elevationMeshNode = fgGetNode(root_node_path, true);
setupPropertyListener(elevationMeshNode, "constraint-gap-m"); setupPropertyListener(elevationMeshNode, "constraint-gap-m");
setupPropertyListener(elevationMeshNode, "lod-range-factor");
setupPropertyListener(elevationMeshNode, "sample-ratio"); setupPropertyListener(elevationMeshNode, "sample-ratio");
setupPropertyListener(elevationMeshNode, "vertical-scale"); setupPropertyListener(elevationMeshNode, "vertical-scale");
setupPropertyListener(elevationMeshNode, "separate-water-mesh");
// We also need to set the maximum range based on the LOD ranges // We also need to set the maximum range based on the LOD ranges
SGPropertyNode_ptr lodNode = fgGetNode(lod_node_path, true); SGPropertyNode_ptr lodNode = fgGetNode(lod_node_path, true);
@ -308,7 +306,6 @@ public:
virtual void valueChanged(SGPropertyNode * node) virtual void valueChanged(SGPropertyNode * node)
{ {
float f = node->getFloatValue(); float f = node->getFloatValue();
bool b = node->getBoolValue();
std::string name(node->getNameString()); std::string name(node->getNameString());
if (name == "constraint-gap-m") { if (name == "constraint-gap-m") {
@ -317,8 +314,6 @@ public:
SGSceneFeatures::instance()->setVPBSampleRatio(f); SGSceneFeatures::instance()->setVPBSampleRatio(f);
} else if (name == "vertical-scale") { } else if (name == "vertical-scale") {
SGSceneFeatures::instance()->setVPBVerticalScale(f); SGSceneFeatures::instance()->setVPBVerticalScale(f);
} else if (name == "separate-water-mesh") {
SGSceneFeatures::instance()->setVPBSeparateWaterMesh(b);
} else { } else {
SG_LOG(SG_TERRAIN, SG_ALERT, "Unexpected property in listener " << node->getPath()); SG_LOG(SG_TERRAIN, SG_ALERT, "Unexpected property in listener " << node->getPath());
} }