Runtime Virtual Texture writing not working in Material Functions

Like a lot of folks, I’m using RVT to do blending of objects into ground planes. I’m using two RVTs, World Height and Materials, and doing the blend on the difference between the RVT World Height and the current Z position.

To write out the RVT data, I made a small bit of blueprint code . It took Material Attributes as an input, broke them out and funneled Color, Roughness, etc., as well as World Height, into the RVT output node. When this code was place directly into the material, it works exactly as expected. However, if you wrap this code up into a Material Function and connect it to the material that way, it doesn’t work AT ALL. The virtual textures remain blank.

Strangely, the code to READ the virtual textures (getting height and material data, calculating the blend region, and blending the material attributes) is wrapped up as a Material Function and works perfectly that way.

Has anyone else encountered this? Is this a known bug? Did I miss something obvious?

Hi, I encountered the same problem, did you figure it out?