Przeglądaj źródła

bugfix parallax after set specularTexture

ncannasse 7 lat temu
rodzic
commit
558bee99af
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      h3d/mat/PbrMaterial.hx

+ 2 - 0
h3d/mat/PbrMaterial.hx

@@ -194,6 +194,8 @@ class PbrMaterial extends Material {
 		if( ps != null ) {
 			ps.heightMap = t;
 			ps.heightMapChannel = A;
+			mainPass.removeShader(ps);
+			mainPass.addShader(ps);
 		}
 
 		return t;