I was studying Ryan Bruck's tutorial on volumetric clouds rendering (https://shaderbits.com/blog/creating-volumetric-ray-marcher), and was trying to recreate it in Unity. I managed to do the 3D texture creation and volumetric rendering with raymarching: But as you can see, and as is to be expected, the shadow is cast from the original mesh, and not from the cloud within. I read online that a custom shadow could be created by writing to the depth buffer, but I couldn't find much documentation on how to do that, and I think volumetric clouds would be kind of a special case, since each pixel is checking multiple samples from the volume. My question is, would that be possible? I think I'm missing some kind of basic shader knowledge about depth buffers and shadowmaps, so if anybody could show me a starting point to learn those I'd be very grateful!