How can I get large quantities of sphere masks into a material?

Hi!

I have a simple sphere mask material for ground displacement at a location and I’ve been trying to create a solution for applying up to 50 of these across a (spherical) mesh at runtime.

The best approach seems to be writing to a texture parameter with a render target and reading pixel values. [This guide by xnihil0zer0][1] shows one such approach but I have not had luck implementing it with sphere masks.

Below is the material for one instance of the sphere mask:

In my situation, I only needed to add one sphere mask at a time, so I am projecting the sphere mask onto a respective plane of the sphere using the below technique applied to local space (see: orthogonal basis & basis transformation in linear algebra)

Can I project a sphere mask onto a render target? - Rendering - Unreal Engine Forums