Hello Guys,
I am developing a game with Angular2 and Bablyon.js. So far no problems, but I recently used the Water material and I couldn't add it to my mesh :
var waterMat = new BABYLON.WaterMaterial("waterMat", newScene, new BABYLON.Vector2(512,512));
waterMat.bumpTexture = new BABYLON.Texture("assets/scenes/home/img/water.png", newScene);
water.material = waterMat; //water is a plan mesh
I downloaded it from the Babylon.js Generator, and when I the console told me : "Unable to load src/Shaders/water.vertex.fx"
I tried to change the Shader Repository, but it didn't change the error. So I assumed it' not linked to that.
BABYON.Engine.ShadersRepository = "../Shaders";
I tried with a stand-alone project, and it worked perfectly. I have no idea where the error come from, and where to add this "water.vertex.fx" file ...
BTW : I import my BABYLON with require in node_modules.
Thank you for your help =)