How did they do such an effect?

I wonder how the effect as shown in the picture was made?

I mean that blurry shadow. This shadow appears on every block layer, which means that it is not a shadow generated by shadow mapping.
I would like to have a similar effect. I had the idea to modify the entire model before displaying it and it is feasible for me, but I would like to get the same effect with a vertex shader.
Unfortunately, as far as I know, apart from shadow mapping, it is impossible to influence the surrounding vertices, or at least I don’t know how to do it.
Anyone advise something?

Search for “soft shadows”. There are many techniques with different trade-offs between performance, accuracy and flexibility.

For that specific case, you could check whether the tiles immediately “upstream” (i.e. toward the sunlight) are at the same height (no shadow) or higher (shadow) and vary the amount of shadow based upon the distance from the edge. That assumes a shallow slope, i.e. neighbouring tiles are either at the same height or one level above/below). If you have steep cliffs where the shadow will extend beyond the foot of the cliff you need to generate a shadow map, but the shadow doesn’t have to be rendered as on/off; you can blur the shadow based upon distance between the casting and receiving surfaces.

I tried to do this by detecting the elevation and the color change of the vertices while still assembling the geometry. Unfortunately, this puts a heavy load on the CPU. As for the use of shaders, I still don’t know how to do it.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.