Explorar el Código

bugfix parallax after set specularTexture

ncannasse hace 7 años
padre
commit
558bee99af
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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;