Tainder Posted November 25, 2013 Share Posted November 25, 2013 Hey, I'm actually trying to make this tutorial : http://blogs.msdn.com/b/eternalcoding/archive/2013/08/06/babylon-js-creating-a-convincing-world-for-your-game-with-custom-shaders-height-maps-and-skyboxes.aspx But I've some problems when I want to set the water and the Island. So if you can help me to understand why this doesn't work because i want to create something based on it, so this will help me a lot . Link of the website : http://lajambobinette.pulseheberg.org/customShaders.htmlLink of all files in it : http://sdrv.ms/1dw90qb Thank for you help. Tainder. Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 25, 2013 Share Posted November 25, 2013 Hello, Several assets are missing in your scene (error 404 in the JS console - F12 on chrome and IE11).Be sure to include the texture ground.jpg (you have Ground.jpg in your files, remove the cap on the first letter) and ground/water shaders. You will find all these assets in the zip file downloaded from github, in subfolder Samples\Scenes\WorldMonger Quote Link to comment Share on other sites More sharing options...
Tainder Posted November 25, 2013 Author Share Posted November 25, 2013 Oh nice, its ok for the ground. But you want me to take the .fx files ? I dont get this point Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 25, 2013 Share Posted November 25, 2013 The .fx files are the vertex and fragments shaders. It is written in GLSL (http://en.wikipedia.org/wiki/OpenGL_Shading_Language) to add a specific effect on a mesh.This is very well described here : http://blogs.msdn.com/b/eternalcoding/archive/2013/08/06/babylon-js-creating-a-convincing-world-for-your-game-with-custom-shaders-height-maps-and-skyboxes.aspxShaders define the code executed by the GPU to process the vertices sent by the meshes and the pixels produced by these vertices. You will need to include the .fx files for water and ground in order to display these specific effect on your scene. Of course, you don't need the vertex and fragment shaders (.fx files) to display a basic scene. If so, I suggest you to use use a different tutorial (https://github.com/BabylonJS/Babylon.js/wiki/Tutorials) Quote Link to comment Share on other sites More sharing options...
Tainder Posted November 25, 2013 Author Share Posted November 25, 2013 Yeah but the point now is i dont get how to include them, this isn't really explain. Only their use with the GPU is told not how to make them work. Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 25, 2013 Share Posted November 25, 2013 Just set it in your project. The line using it is in the file waterMaterial.js (line 70). At the root of your project, put bump.png, water.fragment.fx, water.vertex.fx.In your file waterMaterial.js, update the line 70 with this : this._effect = engine.createEffect("water",instead of : this._effect = engine.createEffect("Water/water",Same for the ground ! It should work. Quote Link to comment Share on other sites More sharing options...
Tainder Posted November 25, 2013 Author Share Posted November 25, 2013 Done but seems like the water don't want to show up http://lajambobinette.pulseheberg.org/customShaders.html Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 26, 2013 Share Posted November 26, 2013 The water is displayed for me I'm using Chrome last version. Quote Link to comment Share on other sites More sharing options...
Tainder Posted November 26, 2013 Author Share Posted November 26, 2013 Thanks ! Its working now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.