reddozen Posted December 29, 2013 Share Posted December 29, 2013 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 I cannot get this example shader to work with Babylon 1.8.0 Unable to compile effect: waterRay(vertexSourceCode=undefined, fragmentSourceCode=undefined, attributesNames=undefined, defines=undefined, optionalDefines=undefined, useFallback=undefined)babylon.1.8.0.js (line 1)Ray(fragmentCode="\r\n#ifdef GL_ES\r\nprecisi...ec4(finalColor, 1.);\r\n}")babylon.1.8.0.js (line 1)Ray()babylon.1.8.0.js (line 1) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 29, 2013 Share Posted December 29, 2013 It could be related to the fact that there is no precision specification on your vertex shader. could you try to add this line at the start of your vertex shader:#ifdef GL_ESprecision mediump float;#endif Quote Link to comment Share on other sites More sharing options...
reddozen Posted December 29, 2013 Author Share Posted December 29, 2013 same problem even after adding the precision. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 29, 2013 Share Posted December 29, 2013 Was it working with previous version of babylon.js? Quote Link to comment Share on other sites More sharing options...
reddozen Posted December 29, 2013 Author Share Posted December 29, 2013 worldmonger version works. Blog version I listed above does not Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 30, 2013 Share Posted December 30, 2013 worldmonger is using babylonjs 1.8 You can downlodad the shader used here:https://github.com/BabylonJS/Babylon.js/tree/master/Samples/Scenes/WorldMonger/Shaders/Water Quote Link to comment Share on other sites More sharing options...
reddozen Posted December 30, 2013 Author Share Posted December 30, 2013 I used the one from worldmonger after I tested it and found it was working. I'm not sure what is causing the problem with the one from the blog, but if it's not your blog, you may want to put a disclaimer on the site that it doesn't work with the latest versions. I wasn't able to figure out the problem on my own. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 31, 2013 Share Posted December 31, 2013 I have no PC right now could you send me the shader code which is not working ? Quote Link to comment Share on other sites More sharing options...
reddozen Posted December 31, 2013 Author Share Posted December 31, 2013 sure.I sent you a PM. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 31, 2013 Share Posted December 31, 2013 I'll check it out quickly^^ Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 21, 2014 Share Posted January 21, 2014 Has there been progress on this? Could somebody please post/publish the updated shader and/or updated waterMaterial.js... if available? THANKS! I might be running into the dreaded XHR allowed-mimetypes problem again... here... this._effect = engine.createEffect("./Water/water", (etc) Quote Link to comment Share on other sites More sharing options...
reddozen Posted January 23, 2014 Author Share Posted January 23, 2014 What I did was take it from the worldmonger demo and just ignored the blog example. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 24, 2014 Share Posted January 24, 2014 Ok, thanks, reddozen. The worldmonger version is the one I'm using, too... so I must have a different issue. Thanks for the reply. 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.