Pryme8 Posted July 12, 2018 Share Posted July 12, 2018 When I use https://cdn.babylonjs.com/babylon.js as my bjs lib, my shadows work. But when I change it to: https://preview.babylonjs.com/babylon.js I had to change to the preview version because it seems SphereEmitters emitRange does not work on the cdn version. The shadows stop working. What are the differences in the versions? Here is the code for the shadows: var sLight = new BABYLON.SpotLight("Spot-light", new BABYLON.Vector3(0,10,0), new BABYLON.Vector3(0,-1,0), 1.12, 32, scene); sLight.intensity = 0.6; ... var spotShadow = new BABYLON.ShadowGenerator(1024, sLight); spotShadow.useExponentialShadowMap = true; spotShadow.usePoissonSampling = true; ... spotShadow.addShadowCaster(container); ... Not really sure what to do different. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 13, 2018 Author Share Posted July 13, 2018 so the CDN one is 3.2 and the preview version is v3.3.0-alpha.12 So I guess the question is, what changed with shadows between these two versions? I can not for the life of me get any shadows to come up with 3.3.0alpha12... but then again that's the version the playground is running and shadows work there still so my brain is about to explode. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 13, 2018 Share Posted July 13, 2018 Doing this: spotShadow.useExponentialShadowMap = true; spotShadow.usePoissonSampling = true; Means that you are only using Poisson (as there is only one filter active) If you can't repro in the PG (even this is weird), can you repro in a page that I can test? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 13, 2018 Author Share Posted July 13, 2018 Yeah I will when I get home today hopefully. Thanks for you help. 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.