Make tree textures consistent across runs by replacing rand() call with
something deterministic.
This commit is contained in:
@@ -253,7 +253,7 @@ struct AddTreesLeafObject
|
|||||||
{
|
{
|
||||||
void operator() (LOD* lod, const TreeBin::Tree& tree) const
|
void operator() (LOD* lod, const TreeBin::Tree& tree) const
|
||||||
{
|
{
|
||||||
Geode* geode = static_cast<Geode*>(lod->getChild(rand() % SG_TREE_FADE_OUT_LEVELS));
|
Geode* geode = static_cast<Geode*>(lod->getChild(int(tree.position.x() * 10.0f) % lod->getNumChildren()));
|
||||||
addTreeToLeafGeode(geode, tree.position);
|
addTreeToLeafGeode(geode, tree.position);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user