Is there any way to get about shadow info?

Godot Version

4.0

Question

I want to compare the similarity between the shadow cast by a light node onto a 3D object and a pre-determined image. However, I’m unsure how to obtain information about the shadow cast on the MashInstance3D node.

Is there a way to retrieve the shadow map created by the light node or obtain information about the shadow cast on the MashInstance3D node?

Shadows are computed on the GPU, so they can’t be read back on the CPU without causing a pipeline stall (which greatly slows down rendering).

It would be possible to expose a way to get this information with a delay of 2-3 frames without causing a pipeline stall, but this isn’t currently implemented.