浏览代码

Update Terrain

ShiroSmith 6 年之前
父节点
当前提交
d14c536b98
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      h3d/scene/pbr/terrain/Tile.hx

+ 2 - 0
h3d/scene/pbr/terrain/Tile.hx

@@ -136,6 +136,8 @@ class Tile extends h3d.scene.Mesh {
 			if(surfaceWeightArray != null) surfaceWeightArray.dispose();
 			surfaceWeightArray = new h3d.mat.TextureArray(getTerrain().weightMapResolution, getTerrain().weightMapResolution, surfaceWeights.length, [Target], R8);
 			surfaceWeightArray.wrap = Clamp;
+			surfaceWeightArray.preventAutoDispose();
+			surfaceWeightArray.realloc = null;
 		}
 		for(i in 0 ... surfaceWeights.length)
 			if(surfaceWeights[i] != null) getTerrain().copyPass.apply(surfaceWeights[i], surfaceWeightArray, None, null, i);