Sign in to follow this  
Pryme8

Shadows different in new Version?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.


 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.