Closed kayD closed 1 year ago
Maybe it is not restricted to fence, but to barriers in general. https://streets.gl/#50.30809,9.00753,45.00,329.50,92.84 shows a similar problem, where a (low) wall seems to cast a shadow onto itself. You have to rotate it in the browser to confirm that the wall itself seems not to be floating in the air, but is correctly set on top of the elevation ground. Also note, that the elevation in this area is pretty high, so that the error in the shadow seems not to be related to the terrain elevation, as it would be much more far off given the elevation.
Here's a recording of the glitch to make the effect clearer (and for posterity)
()
Nice! And I just found you can also just stare at the ring and make time fly: https://streets.gl/#50.30815,9.00766,45.00,67.22,134.03 I.e., set dynamic time to a high acceleration like x1000. It appears as if the shadow is cast to a different elevation model.
This is caused by the incorrect sampling of the terrain elevation texture when using texture()
. At some point I fixed this by using texelFetch()
for the projected mesh material, but forgot to do the same for the depth material which is used by the shadow mapping pass.
It should be fixed now. But I don't have any means to check if the fix actually works as I don't reproduce this on my device. @kayD @waldyrious it would be great if you could provide feedback.
It works for me now, problem solved! Thank you so much, that was a fast one!
The shadows of a fence barrier is some meters away from the fence itself.
Example https://streets.gl/#49.84969,9.96068,45.00,194.79,87.58
Note the fence's shadow is off, but the buildings shadows are correct.
System information
It may be loosely related to #110, #16 or #32, but not to #133 as I confirmed this issue both in Vivaldi (Chrome) and Firefox.