It seems shadow will be cutoff when ALPHA set to 0, even if render_mode depth_prepass_alpha has been added on.
One way I’ve tried is to duplicate a cast-shadow-only MeshInstance3D to render shadow separately. But is there any way inside shader to cast shadow when ALPHA = 0 ?
Btw, ALPHA_SCISSOR_THRESHOLD can’t set to 0.0 since I want to keep it invisible when ALPHA = 0.
Unfortunately I can’t set MeshInstance’s transparency since there is just a part of it’s mesh invisible.
The application scenario is I’m creating procedural terrain mesh and want to hide unexplored terrain part, so I set these parts’ alpha value to zero, but I still wan to process shadow correctly for hidden parts. I don’t know how to implement correctly in shader.