Shadows not appearing on loaded models

Code I was using previously to generate shadows on loaded models is no longer working as of latest release. Works on meshes created in scene - but not loaded meshes.

PG here (relevant code at end):

Any ideas?

ps. see screenshot. i’m noting that that’s a weird shadow on the created box mesh, right? going both directions…? Goes away when comment out the useBlurExponentialShadowMap.

All works fine when loading Babylon js from the CDN instead of preview:

pinging @Evgeni_Popov, got any ideas if we missed something in the loader?

Pinging @sebavan

You forgot a g. in the callback :slight_smile:

Ah, so I did.
But that didn’t seem to fix the issue. Still no shadow, right? Do you see one?

Having a look right now, but it does work with 4.1.0.

There is not a lot of changes for 4.2.0 yet, so that’s strange…

Yup I see it in :slight_smile:

I don’t see it. I’m using Chrome. I cleared the cache of the browser but still no shadow…

I can not see it anymore lol

So my cache then :slight_smile:

1 Like

@Deltakosh When reverting back the changes performed by Fix CCW/CW conflict with instances · BabylonJS/Babylon.js@8051103 · GitHub on the shadowGenerator.ts file, it does work again.

Yup trying to look into that as well, basically this was fixing issues with instances

It seems it is an artifact when using the ESM / blur ESM techniques: the part of your cube that is below the ground does also cast shadow (if you raise the cube above the ground the artifact disappears). It does not happen with other techniques (PCF, PCSS, Poisson, …).


I have a fix incoming for the other one