JustMeSander Posted August 11, 2016 Share Posted August 11, 2016 I have an issue with the TerrainMaterial and shadow casting Example: http://www.babylonjs-playground.com/#E6OZX#46 Not sure how to debug or fix this myself The error returned from babylonjs is "Unable to compile effect with current defines. Trying next fallback." I don't seem to get more information or clues what exactly goes wrong Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 11, 2016 Share Posted August 11, 2016 http://www.babylonjs-playground.com/#E6OZX#52 not sure why your terrain material is not working, I have never used it before so Im not sure... but once you stop trying to set it your shadows work... so Im assuming there is some sort of inconstancy in the way that your doing your terrain shader. Im not sure what files are actually hosted on the playground, but I have a sneaking suspicion, your pointing to textures that do not exist. Quote Link to comment Share on other sites More sharing options...
JustMeSander Posted August 11, 2016 Author Share Posted August 11, 2016 7 hours ago, Pryme8 said: http://www.babylonjs-playground.com/#E6OZX#52 not sure why your terrain material is not working, I have never used it before so Im not sure... but once you stop trying to set it your shadows work... so Im assuming there is some sort of inconstancy in the way that your doing your terrain shader. Im not sure what files are actually hosted on the playground, but I have a sneaking suspicion, your pointing to textures that do not exist. The textures do exist, when you set the `receiveShadows` to false everything works fine and all textures are loaded. So it looks like an issue in the fragement/vertex shader? But I don't have an idea how i can debug that easily. (It's pretty new for me webgl etc) Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted August 12, 2016 Share Posted August 12, 2016 Right ! Just looking for the errors in the console, looks like the shader is corrupted when activating shadows Fixing it right now Quote Link to comment Share on other sites More sharing options...
JustMeSander Posted August 14, 2016 Author Share Posted August 14, 2016 On 8/12/2016 at 9:01 PM, Luaacro said: Right ! Just looking for the errors in the console, looks like the shader is corrupted when activating shadows Fixing it right now Thanks! Just a question, what is the "best practice" in debugging GLSL code? or to get familiar with it. Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted August 17, 2016 Share Posted August 17, 2016 Fixed ! The pull request is here (https://github.com/BabylonJS/Babylon.js/pull/1309) and will be soon merged I have learn HLSL before and debugged my HLSL code (which is the GLSL of direct3D) with Visual Studio. I think this (https://developer.mozilla.org/en-US/docs/Tools/Shader_Editor) can be a good to start debugging GLSL code 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.