Jump to content

Problem with TerrainMaterial and shadows


JustMeSander
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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) 
 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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

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...