Make shadow receiver's bumpMap/normalMap affect shadow contour?

For example, here we have a shadow on the wall, but the bumpMap does not make the shadow edges change shape based on the bumpMap. Here we have two lights, so that we can se both the texture of the wall, and a shadow from another light, at the same time. The shadow’s edges are straight lines instead of following the contour of the bumpMap (I placed lines next to the shadow edges):

Imagine, if those gray lines were two strips of tape on the wall, they wouldn’t be in a straight line, and similarly the shadow edges would have the same effect.

I suspect the only way to achieve this in plain Three is to patch custom bump map logic into the shader(s), but I wanted to double check to see if there’s an existing easier way (a lib, available code to inject, maybe someone already knows, etc).

I’d like to achieve something similar to this, but wondering how I might do it with a normal map instead of a displacement map:


After (with displacement map, but I don’t want to introduce triangles to morph the mesh, only draw the shadow similarly):

/cc Bump map (normal map) shadows? - #4 by donmccurdy

1 Like

In this case, the shadow comes from another object, rather than the bumps. I’m imagining something similar but sampling the shadow map differently. Would be sweet to have both.

One day I’ll circle back to this. Need to get Lume in its planned shape first.