WS30: Add waterline-start and waterline-end params
Used for coastline mixing.
This commit is contained in:
@@ -401,9 +401,9 @@ public:
|
|||||||
(0 < tex_height) ? 1000.0f/tex_height : 1.0f);
|
(0 < tex_height) ? 1000.0f/tex_height : 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
float get_parameter(const std::string& param) const
|
float get_parameter(const std::string& param, float defaultValue = (0.0F)) const
|
||||||
{
|
{
|
||||||
return parameters->getFloatValue(param);
|
return parameters->getFloatValue(param, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ SGMaterialCache::Atlas SGMaterialLib::getMaterialTextureAtlas(SGVec2f center, co
|
|||||||
water = 1.0;
|
water = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
atlas.materialParams3->setElement(materialLookupIndex, osg::Vec4f(water, 0.0, 0.0, 0.0));
|
atlas.materialParams3->setElement(materialLookupIndex, osg::Vec4f(water, mat->get_parameter("waterline-start"), mat->get_parameter("waterline-end"), 0.0));
|
||||||
|
|
||||||
// Similarly, there are specifically 7 textures that are defined in the materials that need to be passed into
|
// Similarly, there are specifically 7 textures that are defined in the materials that need to be passed into
|
||||||
// the shader as an array based on the material lookup.
|
// the shader as an array based on the material lookup.
|
||||||
|
|||||||
Reference in New Issue
Block a user