Explorar o código

set material as terrain

Nicolas Cannasse %!s(int64=5) %!d(string=hai) anos
pai
achega
6e38469c0b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      hrt/prefab/l3d/HeightMap.hx

+ 1 - 0
hrt/prefab/l3d/HeightMap.hx

@@ -148,6 +148,7 @@ class HeightMapTile {
 	public function create(mesh:HeightMapMesh) {
 	public function create(mesh:HeightMapMesh) {
 		if( root != null ) throw "assert";
 		if( root != null ) throw "assert";
 		root = new h3d.scene.Mesh(mesh.grid);
 		root = new h3d.scene.Mesh(mesh.grid);
+		root.material.mainPass.setPassName("terrain");
 		root.x = hmap.size * tx;
 		root.x = hmap.size * tx;
 		root.y = hmap.size * ty;
 		root.y = hmap.size * ty;