Convergence Posted November 18, 2016 Share Posted November 18, 2016 While trying to make my own shader I seem to get stuck in getting shadows to work for a directional light. I copy/pasted what I believe are all the relevant parts from the babylon standard shaders into my own vertex and fragment shaders, and while it compiles and light/textures work just fine, shadows do not appear. Could anyone point me to the issue? gl throws a warning about lack of textures, but I don't believe that affects the outcome as my complete shader with textures has the same issue. http://www.babylonjs-playground.com/#1JFVDG#0; Uncomment line 124 to apply the shader to the ground mesh. Thanks again as usual PS. the playground seems to hang quite a lot trying to run this code, out of the playground it works fine. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 18, 2016 Share Posted November 18, 2016 Hey can you update the PG with multiline shader? I started it here: http://www.babylonjs-playground.com/#1JFVDG#1 (using this string delimiter: `) Quote Link to comment Share on other sites More sharing options...
Convergence Posted November 18, 2016 Author Share Posted November 18, 2016 Sure thing: http://www.babylonjs-playground.com/#1JFVDG#3 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted November 19, 2016 Share Posted November 19, 2016 Hello can you simply this example further? Maybe then you find the problem by yourself. I cant even rerun the playground, it keeps crashing my browser. And after few trials and errors, i think the problem is somewhere in your prototype functions. Shadowmap as a remainder for myself is very simple, you got a light, you bake a texture and project it on an object. 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.