Interactive snow shader issues

Godot Version

4.4

Question

Hi all, I’m trying to make a interactive snow shader using the depth buffer as a heightmap but keep running into issues. I have a few questions I was hoping someone could help out with. So, firstly, my method involves using an orthogonal camera rendering below the ground with a quad for visualizing the depth buffer on top of it, which are both inside a subviewport. I take the subviewport’s texture and use that as the heightmap for my shader.

However, I’ve come across a few complications, namely:

  1. I can’t seem to get it to keep past frames for the accumulation of snow (what I am trying to achieve is similar to having clear mode set to never, which no, does not work.), and that well… ruins the whole snow thing sorta.
  2. I intend to use this for terrain that goes up and down, but it only works on flat terrain. If the terrain goes up, it eventually stops rendering the objects as they are farther from the camera now. I want to just get the bottom of meshes for the footprints, without any complications from the Y value.

I’ve been going insane trying to figure this out, any ideas? Sorry if this doesn’t make any sense, I feel like a madman rambling currently.