added grass painting

This commit is contained in:
Soloman N
2018-06-07 12:42:41 -04:00
Unverified
parent 4c131fa0af
commit b971beb5bf
17 changed files with 2390 additions and 586 deletions
+8
View File
@@ -195,6 +195,14 @@ namespace CodeWalker.Rendering
}
}
public void Invalidate(YmapGrassInstanceBatch batch)
{
lock (updateSyncRoot)
{
instbatches.Invalidate(batch);
}
}
}
+5
View File
@@ -380,6 +380,11 @@ namespace CodeWalker.Rendering
renderableCache.Invalidate(path);
}
public void Invalidate(YmapGrassInstanceBatch batch)
{
renderableCache.Invalidate(batch);
}
public void UpdateSelectionDrawFlags(DrawableModel model, DrawableGeometry geom, bool rem)
{
+4
View File
@@ -695,6 +695,10 @@ namespace CodeWalker.Rendering
{
var gb = batch.Key;
// sanity check
if (batch.GrassInstanceBuffer == null)
return;
VSEntityVars.Vars.CamRel = new Vector4(gb.CamRel, 0.0f);
VSEntityVars.Vars.Orientation = Quaternion.Identity;
VSEntityVars.Vars.Scale = Vector3.One;