wrapv = props->getBoolValue("wrapv", true);
mipmap = props->getBoolValue("mipmap", true);
light_coverage = props->getDoubleValue("light-coverage", 0.0);
- tree_coverage = props->getDoubleValue("tree-coverage", 0.0);
+ wood_coverage = props->getDoubleValue("wood-coverage", 0.0);
+ wood_size = props->getDoubleValue("wood-size", 0.0);
+ tree_density = props->getDoubleValue("tree-density", 1.0);
tree_height = props->getDoubleValue("tree-height-m", 0.0);
tree_width = props->getDoubleValue("tree-width-m", 0.0);
tree_range = props->getDoubleValue("tree-range-m", 0.0);
tree_varieties = props->getIntValue("tree-varieties", 1);
+
const SGPropertyNode* treeTexNode = props->getChild("tree-texture");
if (treeTexNode) {
string treeTexPath = props->getStringValue("tree-texture");
copyProperties(propRoot, effectProp);
SGPropertyNode* effectParamProp = effectProp->getChild("parameters", 0);
SGPropertyNode* texProp = makeChild(effectParamProp, "texture");
- SGPropertyNode* tex2dProp = makeChild(texProp, "texture2d");
- makeChild(tex2dProp, "image")->setStringValue(matState.texture_path);
- makeChild(tex2dProp, "filter")
+ makeChild(texProp, "image")->setStringValue(matState.texture_path);
+ makeChild(texProp, "filter")
->setStringValue(mipmap ? "linear-mipmap-linear" : "nearest");
- makeChild(tex2dProp, "wrap-s")
+ makeChild(texProp, "wrap-s")
->setStringValue(wrapu ? "repeat" : "clamp");
- makeChild(tex2dProp, "wrap-t")
+ makeChild(texProp, "wrap-t")
->setStringValue(wrapv ? "repeat" : "clamp");
matState.effect = makeEffect(effectProp, false, options);
matState.effect->setUserData(user.get());