Jump to content

Casting shadows with useBlurCloseExponentialShadowMap


Recommended Posts


I am using shadowGenerator.useBlurCloseExponentialShadowMap = true; to cast shadows.

Oddly, the closer the shadow casting mesh is to the shadow receiving mesh, the lighter the shadows.. see attached pic.

I am not using this for self-shadowing, just to cast a shadow from one mesh to another.

I appreciate shadow / lighting setup is or can be complex, but is this behaviour expected or am I misusing useBlurCloseExponentialShadowMap ?

Thank you


Link to comment
Share on other sites

Hiya babbleon!

Ummm, boy, I'm not very experienced with these fancy shadows, but I noticed one thing (possibly worthless)...


Play-around with activating/de-activating lines 29/30.

I don't know if anything helpful can be discovered in this playground, but maybe.

useBlurExponentialShadowMap seems to eliminate the gap.

But, I did not answer your "Is this expected behavior? ...question, did I?   Sorry.

Perhaps others will comment soon.  Stay tuned. 

Link to comment
Share on other sites

Many thanks @Wingnut & @Deltakosh and sorry for the late reply.

Using useBlurExponentialShadowMap makes my shadows start at the base of the leg.

However, I am intrigued by the use of useBlurCloseExponentialShadowMap and if somehow it's possible to reverse the falloff of the shadow so that it is more intense on the ground closest to the base of the leg and then eventually disappears.

I have played around with the light.shadowMaxZ & light.shadowMinZ but I cannot make it look how I imagined, not a great example but a bit like the image in the link below:

https://pixabay.com/en/furniture-dining-table-chair-wood-964584/ (see how the shadow is more intense on floor closer to the leg and then just fades away).

This isn't vital to get the shadow falloff like on the above, but would be cool if I could!


Link to comment
Share on other sites

  • 1 month later...

@Deltakosh - would you be able to point me to the relevant part of the code where the magic of useBlurCloseExponentialShadowMap happens please?

I feel as though the (useBlurCloseExponentialShadowMap) shadows currently have an inverted intensity - see my first post in this thread.

Thank you


Link to comment
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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...