phil1234 Posted October 8, 2015 Share Posted October 8, 2015 Hello , I try to use this code from the postprocessor tutorialbut it does not compilevar postProcess0 = new BABYLON.PassPostProcess("Scene copy", 1.0, camera); var postProcess4 = new BABYLON.PostProcess("Final compose", "./Scenes/Customs/postprocesses/compose", ["sceneIntensity", "glowIntensity", "highlightIntensity"], ["sceneSampler"], 1, camera); postProcess4.onApply = function (effect) { effect.setTextureFromPostProcess("sceneSampler", postProcess0); effect.setFloat("sceneIntensity", 0.5); effect.setFloat("glowIntensity", 0.4); effect.setFloat("highlightIntensity", 1.0); };FFox console:GETXHRhttp://localhost/system/Scenes/Customs/postprocesses/compose.fragment.fx [HTTP/1.1 404 Not Found 0ms]BJS - [08:55:50]: Unable to compile effect: babylon.2.2.max.js:4861:13BJS - [08:55:50]: Vertex shader:postprocess babylon.2.2.max.js:4861:13BJS - [08:55:50]: Fragment shader:./Scenes/Customs/postprocesses/compose babylon.2.2.max.js:4861:13BJS - [08:55:50]: Defines: babylon.2.2.max.js:4861:13BJS - [08:55:50]: Error: ERROR: 0:? : '' : syntax error babylon.2.2.max.js:4861:13Error: WebGL: shaderSource: String contains the illegal character '34'any idea ? thanks Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 8, 2015 Author Share Posted October 8, 2015 ok I figured out I had to add some files from the samples archive (missed the 404) but I get a syntax error on the first line of the downsample shader in ffox it goes away if I remove # lines but the screen is white and I get another misformed file error (as if the shader was interpreted as a json) If I remove all commens, leaving just the code I get a syntax error at the first line it seems the shader file is not interpreted the right way Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 8, 2015 Author Share Posted October 8, 2015 anyone ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 8, 2015 Share Posted October 8, 2015 Did you configure your server to serve .fx files (MIME type) Quote Link to comment Share on other sites More sharing options...
MarianG Posted October 8, 2015 Share Posted October 8, 2015 here you can test your shader code. http://www.babylonjs.com/cyos/ ....... and when I used shaders I added this line of codeBABYLON.Engine.ShadersRepository = "";but I don't know if it's necesarely in your case Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 9, 2015 Author Share Posted October 9, 2015 well I cant compile postprocessor shaders no matter whatI'll see if I have better luck with another engine Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 9, 2015 Author Share Posted October 9, 2015 Did you configure your server to serve .fx files (MIME type)the engine receives the filebesides, I just realize, the page is not servet, it is supposed to be a local page, no server involvedHow can I give the postprocess the code in js ? Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 9, 2015 Author Share Posted October 9, 2015 here you can test your shader code. http://www.babylonjs.com/cyos/ ....... and when I used shaders I added this line of codeBABYLON.Engine.ShadersRepository = "";but I don't know if it's necesarely in your case I know cyos,nothing to do with the issue I postedin my case the enigne does not recognize the file, it gives syntax errorit is a shader form babylon repository, not a shader I wrote Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 9, 2015 Author Share Posted October 9, 2015 so after investigating further - it loads the shader file (.fx)- it compiles fine on chrome- it does not compile fine in firefox, wich does not make any sens since the same shader source is compiled with the same opengl driver Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 9, 2015 Share Posted October 9, 2015 I thought you decided to use another engine adam and Wingnut 2 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.