Jump to content

Recommended Posts

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 =)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...