KarelAnker Posted October 19, 2015 Share Posted October 19, 2015 http://codepen.io/rbozan/pen/bVYXNG The color of the boxes are lightblue whenever useVarianceShadowMaps is disabled, and are white (but barely visible) when they are enabled, because useVarianceShadowMaps makes the whole box way too dark.This only happens when the mesh is added to the shadowMap and has receiveShadows enabled. Quote Link to comment Share on other sites More sharing options...
iiceman Posted October 19, 2015 Share Posted October 19, 2015 Hi Karel, first of all: do you know the awesome shiney babylon playground? That's this bad boy here: www.babylonjs-playground.com Much better than that old stinky codepen of yours, isn't it? The playground comes with all the fancy stuff like code completion and highlighting of syntax errors and hints like when you forget to write "var" when declaring a new variable So your scene could be something like that in the playground: http://www.babylonjs-playground.com/#2UJZRIt's a bit cleaner, bit easier to play with. I had to change your Mesh.CreateBox to MeshBuilder.CreateBox to suit the latest Babylon version. I added some "var" here and there and I left that switching between varianceShadowMap on/off out. Now about your question, it's been asked in a lot of topics already and in my opinion it is still a problem for some people (I am talking about me here ). I fear self-shadowing like you want it is just not possible at the moment with the varianceShadowMaps. Why you ask? Well, let me put it like this, when ever you don't understand something, it's best to use a quote: Unfortunately, this is a strong constraint of the blurred shadows (due mainly to the lack of precision of RGBA32 texture).source: http://www.html5gamedevs.com/topic/12682-odd-self-shadowing/ I know that's not what you hoped to hear, sorry. As I said I wish it would work like that myself. So what now? Maybe just stick with the Poisson Sampling, doesn't look too bad, if you ask me: http://www.babylonjs-playground.com/#2UJZR#1 For those who read a lot in this forum: this post was written in the style of Wingnut, just because ; ) 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.